aboutsummaryrefslogtreecommitdiffstats
path: root/tools/nirio_programmer
diff options
context:
space:
mode:
authorMichael Dickens <michael.dickens@ettus.com>2019-10-15 11:36:24 -0700
committerMartin Braun <martin.braun@ettus.com>2019-10-15 11:44:38 -0700
commitf520573c3dd103b2e409d1edc4b960985aa2e1eb (patch)
tree58aa13f3ec8e97ee4b9b218f8527d74526e9d8b2 /tools/nirio_programmer
parent90f8cbc12fe674d373652657b61b8466dcbc3469 (diff)
downloaduhd-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/nirio_programmer')
-rw-r--r--tools/nirio_programmer/CMakeLists.txt30
1 files changed, 13 insertions, 17 deletions
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(