aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2016-08-10 15:13:14 -0700
committerMartin Braun <martin.braun@ettus.com>2016-08-10 15:13:14 -0700
commit1051ca97f52631b57889625626e2a5b48724487f (patch)
treeb90c6d511706a474770a1801cc8b23c0c6f429d4
parent1686a7baeabc84541e123cbb21e699947109a2d2 (diff)
downloaduhd-1051ca97f52631b57889625626e2a5b48724487f.tar.gz
uhd-1051ca97f52631b57889625626e2a5b48724487f.tar.bz2
uhd-1051ca97f52631b57889625626e2a5b48724487f.zip
cmake: Conditionally set UHD_RFNOC_FOUND depending on ENABLE_RFNOC
-rw-r--r--host/CMakeLists.txt6
-rw-r--r--host/cmake/Modules/UHDConfig.cmake.in2
2 files changed, 7 insertions, 1 deletions
diff --git a/host/CMakeLists.txt b/host/CMakeLists.txt
index 6660b3bdc..69254bcdc 100644
--- a/host/CMakeLists.txt
+++ b/host/CMakeLists.txt
@@ -433,6 +433,12 @@ ENDFOREACH(Boost_Comp)
IF(ENABLE_USB)
LIST(APPEND UHD_LINK_LIST_STATIC "usb-1.0")
ENDIF(ENABLE_USB)
+# UHDConfig.cmake also needs UHD_RFNOC_FOUND
+IF(ENABLE_RFNOC)
+ SET(UHD_RFNOC_FOUND "TRUE")
+ELSE()
+ SET(UHD_RFNOC_FOUND "FALSE")
+ENDIF(ENABLE_RFNOC)
CONFIGURE_FILE(
${CMAKE_SOURCE_DIR}/cmake/Modules/UHDConfigVersion.cmake.in
diff --git a/host/cmake/Modules/UHDConfig.cmake.in b/host/cmake/Modules/UHDConfig.cmake.in
index bbe947dc1..e0951a93e 100644
--- a/host/cmake/Modules/UHDConfig.cmake.in
+++ b/host/cmake/Modules/UHDConfig.cmake.in
@@ -36,7 +36,7 @@ set(ENV{UHD_CONFIG_USED} TRUE)
# set default values
SET(UHD_FOUND TRUE)
-SET(UHD_RFNOC_FOUND TRUE)
+SET(UHD_RFNOC_FOUND @UHD_RFNOC_FOUND@)
SET(UHD_INCLUDE_HINTS)
SET(UHD_LIBDIR_HINTS)
SET(UHD_DIR $ENV{UHD_DIR})