diff options
author | Michael Dickens <michael.dickens@ettus.com> | 2019-10-15 11:36:24 -0700 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2019-10-15 11:44:38 -0700 |
commit | f520573c3dd103b2e409d1edc4b960985aa2e1eb (patch) | |
tree | 58aa13f3ec8e97ee4b9b218f8527d74526e9d8b2 /tools | |
parent | 90f8cbc12fe674d373652657b61b8466dcbc3469 (diff) | |
download | uhd-f520573c3dd103b2e409d1edc4b960985aa2e1eb.tar.gz uhd-f520573c3dd103b2e409d1edc4b960985aa2e1eb.tar.bz2 uhd-f520573c3dd103b2e409d1edc4b960985aa2e1eb.zip |
cmake: Use new UHDBoost.cmake in init_usrp and tools
Modifies the CMake for the following utilities:
- init_usrp (example)
- kitchen_sink
- nirio_programmer
Diffstat (limited to 'tools')
-rw-r--r-- | tools/kitchen_sink/CMakeLists.txt | 34 | ||||
-rw-r--r-- | tools/nirio_programmer/CMakeLists.txt | 30 |
2 files changed, 21 insertions, 43 deletions
diff --git a/tools/kitchen_sink/CMakeLists.txt b/tools/kitchen_sink/CMakeLists.txt index 22b5829c7..6c621b448 100644 --- a/tools/kitchen_sink/CMakeLists.txt +++ b/tools/kitchen_sink/CMakeLists.txt @@ -1,5 +1,6 @@ # # Copyright 2010-2012 Ettus Research LLC +# Copyright 2019 Ettus Research, a National Instruments Brand # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -15,7 +16,7 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. # -cmake_minimum_required(VERSION 2.8) +cmake_minimum_required(VERSION 3.5.1) project(kitchen_sink CXX) ############################################################################### @@ -28,8 +29,11 @@ endif(NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE} CACHE STRING "") ### Set up build environment ################################################## +#### Set up UHD: +find_package(UHD 3.15.0.0 REQUIRED) + #### Set up Boost: -set(BOOST_REQUIRED_COMPONENTS +set(UHD_BOOST_REQUIRED_COMPONENTS date_time filesystem program_options @@ -38,30 +42,8 @@ set(BOOST_REQUIRED_COMPONENTS thread unit_test_framework ) -if(UNIX AND EXISTS "/usr/lib64") - list(APPEND BOOST_LIBRARYDIR "/usr/lib64") #fedora 64-bit fix -endif(UNIX AND EXISTS "/usr/lib64") - -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) - unset(BOOST_REQUIRED_COMPONENTS) #empty components list for static link - endif(BOOST_ALL_DYN_LINK) -endif(MSVC) - -set(Boost_ADDITIONAL_VERSIONS - "1.45.0" "1.45" "1.46.0" "1.46" "1.47.0" "1.47" "1.48.0" "1.48" "1.49.0" "1.49" - "1.50.0" "1.50" "1.51.0" "1.51" "1.52.0" "1.52" "1.53.0" "1.53" "1.54.0" "1.54" - "1.55.0" "1.55" "1.56.0" "1.56" "1.57.0" "1.57" "1.58.0" "1.58" "1.59.0" "1.59" - "1.60.0" "1.60" "1.61.0" "1.61" "1.62.0" "1.62" "1.63.0" "1.63" "1.64.0" "1.64" - "1.65.0" "1.65" "1.66.0" "1.66" "1.67.0" "1.67" "1.68.0" "1.68" "1.69.0" "1.69" -) -find_package(Boost 1.46 COMPONENTS ${BOOST_REQUIRED_COMPONENTS}) - -#### Set up UHD: -find_package(UHD "3.7.3" REQUIRED) +set(BOOST_MIN_VERSION "1.58") +include(UHDBoost) ### Configure Compiler ######################################################## include_directories( diff --git a/tools/nirio_programmer/CMakeLists.txt b/tools/nirio_programmer/CMakeLists.txt index 9d3884863..1452d4e66 100644 --- a/tools/nirio_programmer/CMakeLists.txt +++ b/tools/nirio_programmer/CMakeLists.txt @@ -1,5 +1,6 @@ # # Copyright 2014-2015 Ettus Research LLC +# Copyright 2019 Ettus Research, a National Instruments Brand # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -15,7 +16,9 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. # -cmake_minimum_required(VERSION 2.8) +cmake_minimum_required(VERSION 3.5.1) +project(NIRIO_PROGRAMMER CXX) +set(CMAKE_CXX_STANDARD 11) ### Set up build environment ################################################## # Choose a static or shared-library build (shared is default, and static will @@ -23,28 +26,21 @@ cmake_minimum_required(VERSION 2.8) # Set this to ON in order to link a static build of UHD: option(UHD_USE_STATIC_LIBS OFF) +# To add UHD as a dependency to this project, add a line such as this: +find_package(UHD 3.15.0.0 REQUIRED) +# The version in ^^^^^ here is a minimum version. +# To specify an exact version: +#find_package(UHD 3.8.1 EXACT REQUIRED) + # This example also requires Boost: -set(BOOST_REQUIRED_COMPONENTS +set(UHD_BOOST_REQUIRED_COMPONENTS program_options system thread regex ) -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: -find_package(UHD "3.8.0" REQUIRED) -# The version in ^^^^^ here is a minimum version. -# To specify an exact version: -#find_package(UHD 3.8.1 EXACT REQUIRED) +set(BOOST_MIN_VERSION "1.58") +include(UHDBoost) ### Configure Compiler ######################################################## include_directories( |