aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/CMakeLists.txt
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2010-03-22 09:50:35 +0000
committerJosh Blum <josh@joshknows.com>2010-03-22 09:50:35 +0000
commit6ba5135c96d81d23eafa4f0740ebbf113d8c798f (patch)
tree50dbe1ac4d36c1a00374718d478617dbb18cd2ef /host/lib/CMakeLists.txt
parent10ee8022dd22f13f942d8bfeeca3b380224fff52 (diff)
parentd66efda608db9f6a1c2ab64659556b53810d87b7 (diff)
downloaduhd-6ba5135c96d81d23eafa4f0740ebbf113d8c798f.tar.gz
uhd-6ba5135c96d81d23eafa4f0740ebbf113d8c798f.tar.bz2
uhd-6ba5135c96d81d23eafa4f0740ebbf113d8c798f.zip
Merge branch 'master' of git@ettus.sourcerepo.com:ettus/uhd into u1e_uhd
Conflicts: host/include/uhd/usrp/dboard_id.hpp
Diffstat (limited to 'host/lib/CMakeLists.txt')
-rw-r--r--host/lib/CMakeLists.txt31
1 files changed, 27 insertions, 4 deletions
diff --git a/host/lib/CMakeLists.txt b/host/lib/CMakeLists.txt
index e547fef85..a7dded86b 100644
--- a/host/lib/CMakeLists.txt
+++ b/host/lib/CMakeLists.txt
@@ -22,9 +22,11 @@ SET(libuhd_sources
device.cpp
device_addr.cpp
gain_handler.cpp
+ load_modules.cpp
metadata.cpp
simple_device.cpp
time_spec.cpp
+ types.cpp
wax.cpp
transport/udp_simple.cpp
transport/vrt.cpp
@@ -44,7 +46,7 @@ SET(libuhd_sources
# Conditionally add the udp sources
########################################################################
LIST(APPEND libuhd_sources
- transport/udp_zero_copy_none.cpp
+ transport/udp_zero_copy_asio.cpp
)
########################################################################
@@ -78,13 +80,34 @@ ELSE(HAS_USRP1E_REQUIRED_HEADERS)
ENDIF(HAS_USRP1E_REQUIRED_HEADERS)
########################################################################
+# 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)
+
+IF(HAVE_DLFCN_H)
+ MESSAGE(STATUS "Module loading supported through dlopen...")
+ ADD_DEFINITIONS(-DHAVE_DLFCN_H)
+ELSEIF(HAVE_WINBASE_H)
+ MESSAGE(STATUS "Module loading supported through LoadLibrary...")
+ ADD_DEFINITIONS(-DHAVE_WINBASE_H)
+ELSE(HAVE_DLFCN_H)
+ MESSAGE(STATUS "Module loading not supported...")
+ENDIF(HAVE_DLFCN_H)
+
+########################################################################
# Setup libuhd library
########################################################################
ADD_LIBRARY(uhd SHARED ${libuhd_sources})
-TARGET_LINK_LIBRARIES(uhd ${Boost_LIBRARIES})
+TARGET_LINK_LIBRARIES(uhd ${Boost_LIBRARIES} ${CMAKE_DL_LIBS})
+
+SET_TARGET_PROPERTIES(uhd PROPERTIES DEFINE_SYMBOL "UHD_DLL_EXPORTS")
INSTALL(TARGETS uhd
- LIBRARY DESTINATION ${LIBRARY_DIR}
- ARCHIVE DESTINATION ${LIBRARY_DIR}
+ LIBRARY DESTINATION ${LIBRARY_DIR} # .so file
+ ARCHIVE DESTINATION ${LIBRARY_DIR} # .lib file
+ RUNTIME DESTINATION ${LIBRARY_DIR} # .dll file
)