diff options
author | Martin Braun <martin.braun@ettus.com> | 2015-01-12 15:23:13 +0100 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2015-01-12 15:23:13 +0100 |
commit | 12e86cc384b150a8fbc1ce22533df62cba58df10 (patch) | |
tree | 9082f7d188dfca315f6b1f17a8ef57ce2995ea50 /host | |
parent | 0b9b070515eaae6a631095f2d08d664e07ee4140 (diff) | |
download | uhd-12e86cc384b150a8fbc1ce22533df62cba58df10.tar.gz uhd-12e86cc384b150a8fbc1ce22533df62cba58df10.tar.bz2 uhd-12e86cc384b150a8fbc1ce22533df62cba58df10.zip |
examples: Fixed init_usrp for building with MSVC
Diffstat (limited to 'host')
-rw-r--r-- | host/examples/init_usrp/CMakeLists.txt | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/host/examples/init_usrp/CMakeLists.txt b/host/examples/init_usrp/CMakeLists.txt index afbf73027..420e79993 100644 --- a/host/examples/init_usrp/CMakeLists.txt +++ b/host/examples/init_usrp/CMakeLists.txt @@ -24,6 +24,14 @@ set(BOOST_REQUIRED_COMPONENTS system thread ) +if(MSVC) + set(BOOST_ALL_DYN_LINK "${BOOST_ALL_DYN_LINK}" CACHE BOOL "boost enable dynamic linking") + if(BOOST_ALL_DYN_LINK) + add_definitions(-DBOOST_ALL_DYN_LINK) #setup boost auto-linking in msvc + else(BOOST_ALL_DYN_LINK) + set(BOOST_REQUIRED_COMPONENTS) #empty components list for static link + endif(BOOST_ALL_DYN_LINK) +endif(MSVC) find_package(Boost "1.46" REQUIRED ${BOOST_REQUIRED_COMPONENTS}) # To add UHD as a dependency to this project, add a line such as this: @@ -37,6 +45,7 @@ include_directories( ${Boost_INCLUDE_DIRS} ${UHD_INCLUDE_DIRS} ) +link_directories(${Boost_LIBRARY_DIRS}) ### Make the executable ####################################################### add_executable(init_usrp init_usrp.cpp) |