aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/CMakeLists.txt
diff options
context:
space:
mode:
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})