aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/CMakeLists.txt
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2010-03-26 11:45:56 -0700
committerJosh Blum <josh@joshknows.com>2010-03-26 11:45:56 -0700
commit08f6b21ce7cc4aa4069b4461785fc7173bed2998 (patch)
tree8856af9e8af41a28245266290dfe29d053938a00 /host/lib/CMakeLists.txt
parent24bd27b90d06820d858c008cff915319873321c5 (diff)
downloaduhd-08f6b21ce7cc4aa4069b4461785fc7173bed2998.tar.gz
uhd-08f6b21ce7cc4aa4069b4461785fc7173bed2998.tar.bz2
uhd-08f6b21ce7cc4aa4069b4461785fc7173bed2998.zip
added interface address discovery
Diffstat (limited to 'host/lib/CMakeLists.txt')
-rw-r--r--host/lib/CMakeLists.txt15
1 files changed, 14 insertions, 1 deletions
diff --git a/host/lib/CMakeLists.txt b/host/lib/CMakeLists.txt
index 22fbde265..4dd638336 100644
--- a/host/lib/CMakeLists.txt
+++ b/host/lib/CMakeLists.txt
@@ -28,6 +28,7 @@ SET(libuhd_sources
time_spec.cpp
types.cpp
wax.cpp
+ transport/if_addrs.cpp
transport/udp_simple.cpp
transport/vrt.cpp
usrp/dboard/basic.cpp
@@ -60,7 +61,6 @@ LIST(APPEND libuhd_sources
# Setup defines for module loading
########################################################################
INCLUDE(CheckIncludeFileCXX)
-
CHECK_INCLUDE_FILE_CXX(dlfcn.h HAVE_DLFCN_H)
CHECK_INCLUDE_FILE_CXX(Winbase.h HAVE_WINBASE_H)
@@ -75,6 +75,19 @@ ELSE(HAVE_DLFCN_H)
ENDIF(HAVE_DLFCN_H)
########################################################################
+# Setup defines for interface address discovery
+########################################################################
+INCLUDE(CheckIncludeFileCXX)
+CHECK_INCLUDE_FILE_CXX(ifaddrs.h HAVE_IFADDRS_H)
+
+IF(HAVE_IFADDRS_H)
+ MESSAGE(STATUS "Interface address discovery supported through getifaddrs...")
+ ADD_DEFINITIONS(-DHAVE_IFADDRS_H)
+ELSE(HAVE_IFADDRS_H)
+ MESSAGE(STATUS "Interface address discovery not supported...")
+ENDIF(HAVE_IFADDRS_H)
+
+########################################################################
# Setup libuhd library
########################################################################
ADD_LIBRARY(uhd SHARED ${libuhd_sources})