summaryrefslogtreecommitdiffstats
path: root/host/lib/transport
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2011-02-17 12:35:01 -0800
committerJosh Blum <josh@joshknows.com>2011-02-17 12:35:01 -0800
commit8b0fbfcd12c7f58ad73678f72681c5f75c1d5880 (patch)
tree37d4a4c3e719d8e357a9c123e91874c6ab21a5b0 /host/lib/transport
parente11ced6bab02d8f548f424e0687b81e73769b9a7 (diff)
downloaduhd-8b0fbfcd12c7f58ad73678f72681c5f75c1d5880.tar.gz
uhd-8b0fbfcd12c7f58ad73678f72681c5f75c1d5880.tar.bz2
uhd-8b0fbfcd12c7f58ad73678f72681c5f75c1d5880.zip
uhd: use source properties to set flags and defs not globally, but only for the source
Diffstat (limited to 'host/lib/transport')
-rw-r--r--host/lib/transport/CMakeLists.txt9
1 files changed, 7 insertions, 2 deletions
diff --git a/host/lib/transport/CMakeLists.txt b/host/lib/transport/CMakeLists.txt
index a66a58d32..a98bcc14e 100644
--- a/host/lib/transport/CMakeLists.txt
+++ b/host/lib/transport/CMakeLists.txt
@@ -55,14 +55,19 @@ CHECK_INCLUDE_FILE_CXX(winsock2.h HAVE_WINSOCK2_H)
IF(HAVE_IFADDRS_H)
MESSAGE(STATUS " Interface address discovery supported through getifaddrs.")
- ADD_DEFINITIONS(-DHAVE_IFADDRS_H)
+ SET(IF_ADDRS_DEFS HAVE_IFADDRS_H)
ELSEIF(HAVE_WINSOCK2_H)
MESSAGE(STATUS " Interface address discovery supported through SIO_GET_INTERFACE_LIST.")
- ADD_DEFINITIONS(-DHAVE_WINSOCK2_H)
+ SET(IF_ADDRS_DEFS HAVE_WINSOCK2_H)
ELSE(HAVE_IFADDRS_H)
MESSAGE(STATUS " Interface address discovery not supported.")
ENDIF(HAVE_IFADDRS_H)
+SET_SOURCE_FILES_PROPERTIES(
+ ${CMAKE_CURRENT_SOURCE_DIR}/if_addrs.cpp
+ PROPERTIES COMPILE_DEFINITIONS "${IF_ADDRS_DEFS}"
+)
+
########################################################################
# Append to the list of sources for lib uhd
########################################################################