aboutsummaryrefslogtreecommitdiffstats
path: root/host/examples/rfnoc-example/apps/CMakeLists.txt
diff options
context:
space:
mode:
authorSugandha Gupta <sugandha.gupta@ettus.com>2019-10-15 11:52:46 -0700
committerMartin Braun <martin.braun@ettus.com>2019-11-26 12:21:32 -0800
commita801d6b046743140e9a50c7788dd17dd71f5540a (patch)
tree58d164e1b4cb2a8d871ca532287699f3912ae3d8 /host/examples/rfnoc-example/apps/CMakeLists.txt
parent2a7e69d862f661075b98bab19e58d958c28a9af8 (diff)
downloaduhd-a801d6b046743140e9a50c7788dd17dd71f5540a.tar.gz
uhd-a801d6b046743140e9a50c7788dd17dd71f5540a.tar.bz2
uhd-a801d6b046743140e9a50c7788dd17dd71f5540a.zip
examples: Add example out-of-tree module for RFNoC modules
This subdirectory is its own, self-contained project. It is supposed to work against the UHD version it is shipped with. Co-Authored-By: Martin Braun <martin.braun@ettus.com> Co-Authored-By: Wade Fife <wade.fife@ni.com>
Diffstat (limited to 'host/examples/rfnoc-example/apps/CMakeLists.txt')
-rw-r--r--host/examples/rfnoc-example/apps/CMakeLists.txt40
1 files changed, 40 insertions, 0 deletions
diff --git a/host/examples/rfnoc-example/apps/CMakeLists.txt b/host/examples/rfnoc-example/apps/CMakeLists.txt
new file mode 100644
index 000000000..db704b720
--- /dev/null
+++ b/host/examples/rfnoc-example/apps/CMakeLists.txt
@@ -0,0 +1,40 @@
+#
+# Copyright 2019 Ettus Research, a National Instruments Brand
+#
+# SPDX-License-Identifier: GPL-3.0-or-later
+#
+
+# This app needs Boost
+set(BOOST_REQUIRED_COMPONENTS
+ program_options
+ system
+)
+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.58 REQUIRED ${BOOST_REQUIRED_COMPONENTS})
+
+include_directories(
+ ${CMAKE_SOURCE_DIR}/lib
+ ${CMAKE_SOURCE_DIR}/include
+ ${CMAKE_BINARY_DIR}/lib
+ ${CMAKE_BINARY_DIR}/include
+ ${UHD_INCLUDE_DIRS}
+ ${Boost_INCLUDE_DIR}
+)
+link_directories(
+ ${Boost_LIBRARY_DIRS}
+)
+
+add_executable(init_gain_block
+ init_gain_block.cpp
+)
+target_link_libraries(init_gain_block
+ ${UHD_LIBRARIES}
+ ${Boost_LIBRARIES}
+)