From 90f8cbc12fe674d373652657b61b8466dcbc3469 Mon Sep 17 00:00:00 2001 From: Michael Dickens Date: Mon, 9 Sep 2019 16:50:39 -0400 Subject: cmake: add UHDBoost.cmake and use it for building UHD Also install UHDBoost.cmake along with the CMake UHD find scripts, so that it can be used by external modules. Tweak the UHDConfig.cmake script so that, once installed, the new UHDBoost.cmake script is found. Note that the project using UHD must first find UHD before trying to find Boost. Also note that if the C++ standard is not set before UHDBoost is loaded, it will be set to that currently used by UHD: C++14. --- host/cmake/Modules/UHDConfig.cmake.in | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'host/cmake/Modules/UHDConfig.cmake.in') diff --git a/host/cmake/Modules/UHDConfig.cmake.in b/host/cmake/Modules/UHDConfig.cmake.in index 30b0d92ff..299a8ef48 100644 --- a/host/cmake/Modules/UHDConfig.cmake.in +++ b/host/cmake/Modules/UHDConfig.cmake.in @@ -18,6 +18,9 @@ # ######################################################################## +# Allows us to use all .cmake files in this directory +list(INSERT CMAKE_MODULE_PATH 0 "${CMAKE_CURRENT_LIST_DIR}") + # set that this file was found, for use in GNU Radio's FindUHD.cmake. # Have to use the ENV, since this file might not allow CACHE changes. @@ -51,7 +54,6 @@ endif() list(APPEND UHD_INCLUDE_HINTS ${CMAKE_INSTALL_PREFIX}/include) list(APPEND UHD_LIBDIR_HINTS ${CMAKE_INSTALL_PREFIX}/lib) - # Search for static libs if so required if( UHD_USE_STATIC_LIBS ) set( _UHD_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES}) -- cgit v1.2.3