summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorRyan Volz <ryan.volz@gmail.com>2021-05-15 16:46:07 -0400
committermormj <34754695+mormj@users.noreply.github.com>2021-06-01 07:43:04 -0400
commitf23985d1e2633d7e2862eb08b21a9bfe9baeb9d1 (patch)
treea62b50590e6d390ae5ce177efb3bf4a2c61dcbcf /cmake
parente324474c5e8bb772deb5115f09ea6e27dbb0920c (diff)
runtime: ctrlport: cmake: Fix thrift dependency for OOTs.
First, this moves find_package(THRIFT) up to the gnuradio-runtime CMakeLists.txt so that cache variables no longer have to be used to mark the found components. This fixes an issue where the thrift-specific headers were not installed even when thrift was enabled, because on first run the detection was occurring AFTER the runtime include CMakeLists.txt was evaluated. See further discussion in #2734, which solved one issue related to this setup. Further, even with thrift enabled, the thrift headers are not required for OOTs to build against gnuradio-runtime. OOTs would need to take special action to use those headers, in which case they should detect/enable thrift on their own. Thus, this makes the change to not add thrift as an extra dependency for OOTs and switches linking of Thrift::thrift from PUBLIC to PRIVATE. Signed-off-by: Ryan Volz <ryan.volz@gmail.com>
Diffstat (limited to 'cmake')
-rw-r--r--cmake/Modules/FindTHRIFT.cmake6
1 files changed, 3 insertions, 3 deletions
diff --git a/cmake/Modules/FindTHRIFT.cmake b/cmake/Modules/FindTHRIFT.cmake
index 7de851c567..8e0e1519a2 100644
--- a/cmake/Modules/FindTHRIFT.cmake
+++ b/cmake/Modules/FindTHRIFT.cmake
@@ -73,18 +73,18 @@ ENDIF (CMAKE_CROSSCOMPILING)
# Set to found if we've made it this far
if(THRIFT_INCLUDE_DIRS AND THRIFT_LIBRARIES AND PYTHON_THRIFT_FOUND)
- set(THRIFT_FOUND TRUE CACHE BOOL "If Thrift has been found")
+ set(THRIFT_FOUND TRUE)
find_file(THRIFT_HAS_VERSION_H thrift/version.h
PATH ${THRIFT_INCLUDE_DIRS} NO_DEFAULT_PATH)
if(THRIFT_HAS_VERSION_H-FOUND)
- set(THRIFT_HAS_VERSION_H TRUE CACHE BOOL "If Thrift has thrift/version.h")
+ set(THRIFT_HAS_VERSION_H TRUE)
endif()
find_file(THRIFT_HAS_THREADFACTORY_H thrift/concurrency/ThreadFactory.h
PATH ${THRIFT_INCLUDE_DIRS} NO_DEFAULT_PATH)
if(THRIFT_HAS_THREADFACTORY_H-FOUND)
- set(THRIFT_HAS_THREADFACTORY_H TRUE CACHE BOOL "If Thrift has thrift/concurrency/ThreadFactory.h")
+ set(THRIFT_HAS_THREADFACTORY_H TRUE)
endif()
endif(THRIFT_INCLUDE_DIRS AND THRIFT_LIBRARIES AND PYTHON_THRIFT_FOUND)