From 1051ca97f52631b57889625626e2a5b48724487f Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Wed, 10 Aug 2016 15:13:14 -0700 Subject: cmake: Conditionally set UHD_RFNOC_FOUND depending on ENABLE_RFNOC --- host/CMakeLists.txt | 6 ++++++ host/cmake/Modules/UHDConfig.cmake.in | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) 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}) -- cgit v1.2.3