aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/transport/CMakeLists.txt
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2011-02-22 12:11:41 -0800
committerJosh Blum <josh@joshknows.com>2011-02-22 12:11:41 -0800
commit8ce6a4853e9e0ef3e18bc30ea00b27ec3a069652 (patch)
tree8b3630a57a9366c414a672a73e47091797dff566 /host/lib/transport/CMakeLists.txt
parent3261b89eeb96a6b87bc35c86be3faf78aee569b0 (diff)
parent9eb19bd9a006c47060b9d0913d2f9d4a49751275 (diff)
downloaduhd-8ce6a4853e9e0ef3e18bc30ea00b27ec3a069652.tar.gz
uhd-8ce6a4853e9e0ef3e18bc30ea00b27ec3a069652.tar.bz2
uhd-8ce6a4853e9e0ef3e18bc30ea00b27ec3a069652.zip
Merge branch 'usrp2_fw_clock_cleanup' into usrp2_dual_dsp
Diffstat (limited to 'host/lib/transport/CMakeLists.txt')
-rw-r--r--host/lib/transport/CMakeLists.txt27
1 files changed, 19 insertions, 8 deletions
diff --git a/host/lib/transport/CMakeLists.txt b/host/lib/transport/CMakeLists.txt
index a98bcc14e..a5bf9c5f1 100644
--- a/host/lib/transport/CMakeLists.txt
+++ b/host/lib/transport/CMakeLists.txt
@@ -48,20 +48,31 @@ ENDIF(ENABLE_USB)
########################################################################
MESSAGE(STATUS "")
MESSAGE(STATUS "Configuring interface address discovery...")
-
+INCLUDE(CheckCXXSourceCompiles)
INCLUDE(CheckIncludeFileCXX)
-CHECK_INCLUDE_FILE_CXX(ifaddrs.h HAVE_IFADDRS_H)
+
+CHECK_CXX_SOURCE_COMPILES("
+ #include <ifaddrs.h>
+ int main(){
+ struct ifaddrs *ifap;
+ getifaddrs(&ifap);
+ return 0;
+ }
+ " HAVE_GETIFADDRS
+)
+
CHECK_INCLUDE_FILE_CXX(winsock2.h HAVE_WINSOCK2_H)
-IF(HAVE_IFADDRS_H)
+IF(HAVE_GETIFADDRS)
MESSAGE(STATUS " Interface address discovery supported through getifaddrs.")
- SET(IF_ADDRS_DEFS HAVE_IFADDRS_H)
+ SET(IF_ADDRS_DEFS HAVE_GETIFADDRS)
ELSEIF(HAVE_WINSOCK2_H)
MESSAGE(STATUS " Interface address discovery supported through SIO_GET_INTERFACE_LIST.")
- SET(IF_ADDRS_DEFS HAVE_WINSOCK2_H)
-ELSE(HAVE_IFADDRS_H)
+ SET(IF_ADDRS_DEFS HAVE_SIO_GET_INTERFACE_LIST)
+ELSE()
MESSAGE(STATUS " Interface address discovery not supported.")
-ENDIF(HAVE_IFADDRS_H)
+ SET(IF_ADDRS_DEFS HAVE_IF_ADDRS_DUMMY)
+ENDIF()
SET_SOURCE_FILES_PROPERTIES(
${CMAKE_CURRENT_SOURCE_DIR}/if_addrs.cpp
@@ -80,6 +91,6 @@ LIBUHD_APPEND_SOURCES(
${CMAKE_CURRENT_SOURCE_DIR}/buffer_pool.cpp
${CMAKE_CURRENT_SOURCE_DIR}/if_addrs.cpp
${CMAKE_CURRENT_SOURCE_DIR}/udp_simple.cpp
- ${CMAKE_CURRENT_SOURCE_DIR}/udp_zero_copy_asio.cpp
+ ${CMAKE_CURRENT_SOURCE_DIR}/udp_zero_copy.cpp
${CMAKE_CURRENT_SOURCE_DIR}/vrt_packet_handler.hpp
)