From 7564d8349a7b2f2211ec23a10f77dc93dc99a175 Mon Sep 17 00:00:00 2001 From: Jon Beniston Date: Sun, 30 Jul 2023 15:45:11 +0100 Subject: [PATCH] Add set_global_cache function to set variable in cache and parent scope. --- external/CMakeLists.txt | 85 ++++++++++++++++++++++------------------- 1 file changed, 46 insertions(+), 39 deletions(-) diff --git a/external/CMakeLists.txt b/external/CMakeLists.txt index 69a46d32e..7f49dbea4 100644 --- a/external/CMakeLists.txt +++ b/external/CMakeLists.txt @@ -192,6 +192,13 @@ macro(set_global NAME VALUE) set(${NAME} ${VALUE} PARENT_SCOPE) endmacro() +# Setting a cache variable doesn't update the variable in parent scope if already set, +# so we need to set the cache and parent_scope separately +macro(set_global_cache NAME VALUE) + set(${NAME} ${VALUE} CACHE INTERNAL "") + set(${NAME} ${VALUE} PARENT_SCOPE) +endmacro() + if (NOT LIBUSB_FOUND AND NOT USE_PRECOMPILED_LIBS) # Cloning git repo doesn't include configure, so we download the bz2 which does ExternalProject_Add(libusb @@ -203,7 +210,7 @@ if (NOT LIBUSB_FOUND AND NOT USE_PRECOMPILED_LIBS) ) ExternalProject_Get_Property(libusb install_dir) set_global(LIBUSB_DEPENDS libusb) - set(LIBUSB_FOUND ON CACHE INTERNAL "") + set_global_cache(LIBUSB_FOUND ON) set(LIBUSB_EXTERNAL ON CACHE INTERNAL "") set(LIBUSB_INCLUDE_DIR "${install_dir}/include/libusb-1.0" CACHE INTERNAL "") if (WIN32) @@ -225,7 +232,7 @@ if (NOT HIDAPI_FOUND AND NOT USE_PRECOMPILED_LIBS) ) ExternalProject_Get_Property(hidapi install_dir) set_global(HIDAPI_DEPENDS hidapi) - set(HIDAPI_FOUND ON CACHE INTERNAL "") + set_global_cache(HIDAPI_FOUND ON) set(HIDAPI_EXTERNAL ON CACHE INTERNAL "") set(HIDAPI_ROOT_DIR "${install_dir}" CACHE INTERNAL "") set(HIDAPI_INCLUDE_DIRS "${install_dir}/include/hidapi" CACHE INTERNAL "") @@ -245,7 +252,7 @@ if (NOT OPUS_FOUND AND NOT USE_PRECOMPILED_LIBS) ) ExternalProject_Get_Property(opus install_dir) set_global(OPUS_DEPENDS opus) - set(OPUS_FOUND ON CACHE INTERNAL "") + set_global_cache(OPUS_FOUND ON) set(OPUS_EXTERNAL ON CACHE INTERNAL "") set(OPUS_INCLUDE_DIRS "${install_dir}/include" CACHE INTERNAL "") set(OPUS_PKG_CONFIG_DIR "${install_dir}/lib/pkgconfig" CACHE INTERNAL "") @@ -268,7 +275,7 @@ if (NOT ZLIB_FOUND AND NOT USE_PRECOMPILED_LIBS) ) ExternalProject_Get_Property(zlib install_dir) set_global(ZLIB_DEPENDS zlib) - set(ZLIB_FOUND ON CACHE INTERNAL "") + set_global_cache(ZLIB_FOUND ON) set(ZLIB_EXTERNAL ON CACHE INTERNAL "") set(ZLIB_INCLUDE_DIRS "${install_dir}/include" CACHE INTERNAL "") if (WIN32) @@ -290,7 +297,7 @@ if (NOT FAAD_FOUND AND NOT USE_PRECOMPILED_LIBS) ) ExternalProject_Get_Property(faad source_dir binary_dir install_dir) set_global(FAAD_DEPENDS faad) - set(FAAD_FOUND ON CACHE INTERNAL "") + set_global_cache(FAAD_FOUND ON) set(FAAD_EXTERNAL ON CACHE INTERNAL "") set(FAAD_INCLUDE_DIR "${install_dir}/include" CACHE INTERNAL "") if (WIN32) @@ -314,7 +321,7 @@ if (NOT FFTW3F_FOUND AND NOT USE_PRECOMPILED_LIBS) ) ExternalProject_Get_Property(fftw3f source_dir binary_dir) set_global(FFTW3F_DEPENDS fftw3f) - set(FFTW3F_FOUND ON CACHE INTERNAL "") + set_global_cache(FFTW3F_FOUND ON) set(FFTW3F_EXTERNAL ON CACHE INTERNAL "") set(FFTW3F_INCLUDE_DIRS "${source_dir}/api" "${binary_dir}" CACHE INTERNAL "") if (WIN32) @@ -398,7 +405,7 @@ if (NOT FFMPEG_FOUND AND NOT USE_PRECOMPILED_LIBS) ExternalProject_Get_Property(x264 install_dir) set_global(X264_DEPENDS x264) set(X264_PKG_CONFIG_DIR "${install_dir}/lib/pkgconfig") - set(X264_FOUND ON CACHE INTERNAL "") + set_global_cache(X264_FOUND ON) set(X264_EXTERNAL ON CACHE INTERNAL "") if (APPLE) set(MACOS_EXTERNAL_LIBS_FIXUP "${MACOS_EXTERNAL_LIBS_FIXUP};${install_dir}/lib") @@ -416,7 +423,7 @@ if (NOT FFMPEG_FOUND AND NOT USE_PRECOMPILED_LIBS) ExternalProject_Get_Property(x265 install_dir) set_global(X265_DEPENDS x265) set(X265_PKG_CONFIG_DIR "${install_dir}/lib/pkgconfig") - set(X265_FOUND ON CACHE INTERNAL "") + set_global_cache(X265_FOUND ON) set(X265_EXTERNAL ON CACHE INTERNAL "") if (APPLE) set(MACOS_EXTERNAL_LIBS_FIXUP "${MACOS_EXTERNAL_LIBS_FIXUP};${install_dir}/lib") @@ -433,7 +440,7 @@ if (NOT FFMPEG_FOUND AND NOT USE_PRECOMPILED_LIBS) ExternalProject_Get_Property(fdk_aac install_dir) set_global(FDK_AAC_DEPENDS fdk_aac) set(FDK_AAC_PKG_CONFIG_DIR "${install_dir}/lib/pkgconfig") - set(FDK_AAC_FOUND ON CACHE INTERNAL "") + set_global_cache(FDK_AAC_FOUND ON) set(FDK_AAC_EXTERNAL ON CACHE INTERNAL "") if (APPLE) set(MACOS_EXTERNAL_LIBS_FIXUP "${MACOS_EXTERNAL_LIBS_FIXUP};${install_dir}/lib") @@ -452,7 +459,7 @@ if (NOT FFMPEG_FOUND AND NOT USE_PRECOMPILED_LIBS) ExternalProject_Get_Property(mpg123 install_dir) set_global(MPG123_DEPENDS mpg123) set(MPG123_PKG_CONFIG_DIR "${install_dir}/lib/pkgconfig") - set(MPG123_FOUND ON CACHE INTERNAL "") + set_global_cache(MPG123_FOUND ON) set(MPG123_EXTERNAL ON CACHE INTERNAL "") if (APPLE) set(MACOS_EXTERNAL_LIBS_FIXUP "${MACOS_EXTERNAL_LIBS_FIXUP};${install_dir}/lib") @@ -475,7 +482,7 @@ if (NOT FFMPEG_FOUND AND NOT USE_PRECOMPILED_LIBS) #set(LAME_PKG_CONFIG_DIR "${install_dir}/lib/pkgconfig") set(LAME_EXTRA_CFLAGS "-I${install_dir}/include") set(LAME_EXTRA_LDFLAGS "-L${install_dir}/lib") - set(LAME_FOUND ON CACHE INTERNAL "") + set_global_cache(LAME_FOUND ON) set(LAME_EXTERNAL ON CACHE INTERNAL "") if (APPLE) set(MACOS_EXTERNAL_LIBS_FIXUP "${MACOS_EXTERNAL_LIBS_FIXUP};${install_dir}/lib") @@ -496,7 +503,7 @@ if (NOT FFMPEG_FOUND AND NOT USE_PRECOMPILED_LIBS) ExternalProject_Get_Property(ffmpeg install_dir) set_global(FFMPEG_DEPENDS ffmpeg) set(FFMPEG_INSTALL_DIR "${install_dir}") - set(FFMPEG_FOUND ON CACHE INTERNAL "") + set_global_cache(FFMPEG_FOUND ON) set(FFMPEG_EXTERNAL ON CACHE INTERNAL "") set(FFMPEG_INCLUDE_DIRS "${install_dir}/include" CACHE INTERNAL "") set(AVCODEC_INCLUDE_DIRS "${install_dir}/include" CACHE INTERNAL "") @@ -527,7 +534,7 @@ if (NOT OpenCV_FOUND AND NOT USE_PRECOMPILED_LIBS) ) ExternalProject_Get_Property(opencv source_dir binary_dir) set_global(OpenCV_DEPENDS opencv) - set(OpenCV_FOUND ON CACHE INTERNAL "") + set_global_cache(OpenCV_FOUND ON) set(OpenCV_EXTERNAL ON CACHE INTERNAL "") set(OpenCV_INCLUDE_DIRS "${source_dir}/modules/calib3d/include" @@ -584,7 +591,7 @@ if ((NOT CODEC2_FOUND OR CODEC2_EXTERNAL) AND NOT USE_PRECOMPILED_LIBS) ) ExternalProject_Get_Property(codec2 source_dir binary_dir) set_global(CODEC2_DEPENDS codec2) - set(CODEC2_FOUND ON CACHE INTERNAL "") + set_global_cache(CODEC2_FOUND ON) set(CODEC2_EXTERNAL ON CACHE INTERNAL "") set(CODEC2_INCLUDE_DIR "${source_dir}/src" "${binary_dir}" CACHE INTERNAL "") if (WIN32) @@ -625,7 +632,7 @@ if (NOT CM256CC_FOUND OR CM256CC_EXTERNAL) ) ExternalProject_Get_Property(cm256cc source_dir binary_dir) set_global(CM256CC_DEPENDS cm256cc) - set(CM256CC_FOUND ON CACHE INTERNAL "") + set_global_cache(CM256CC_FOUND ON) set(CM256CC_EXTERNAL ON CACHE INTERNAL "") # we need cm256cc/library.h set(CM256CC_INCLUDE_DIR "${EXTERNAL_BUILD_LIBRARIES}/cm256cc/src" CACHE INTERNAL "") @@ -658,7 +665,7 @@ if ((NOT LIBDSDCC_FOUND OR LIBDSDCC_EXTERNAL) AND (NOT LIBMBE_FOUND OR LIBMBE_EX ExternalProject_Get_Property(mbelib source_dir binary_dir) set(USE_MBELIB ON) set_global(DSDCC_DEPENDS mbelib) - set(LIBMBE_FOUND ON CACHE INTERNAL "") + set_global_cache(LIBMBE_FOUND ON) set(LIBMBE_EXTERNAL ON CACHE INTERNAL "") set(LIBMBE_INCLUDE_DIR "${source_dir}" CACHE INTERNAL "") if (WIN32) @@ -688,7 +695,7 @@ if (NOT LIBSERIALDV_FOUND OR LIBSERIALDV_EXTERNAL) TEST_COMMAND "" ) ExternalProject_Get_Property(serialdv source_dir binary_dir) - set(LIBSERIALDV_FOUND ON CACHE INTERNAL "") + set_global_cache(LIBSERIALDV_FOUND ON) set(LIBSERIALDV_EXTERNAL ON CACHE INTERNAL "") set(LIBSERIALDV_INCLUDE_DIR "${source_dir}" CACHE INTERNAL "") if (WIN32) @@ -729,7 +736,7 @@ if ((NOT LIBDSDCC_FOUND OR LIBDSDCC_EXTERNAL) AND LIBMBE_FOUND) TEST_COMMAND "" ) ExternalProject_Get_Property(dsdcc source_dir binary_dir) - set(LIBDSDCC_FOUND ON CACHE INTERNAL "") + set_global_cache(LIBDSDCC_FOUND ON) set(LIBDSDCC_EXTERNAL ON CACHE INTERNAL "") set(LIBDSDCC_INCLUDE_DIR "${EXTERNAL_BUILD_LIBRARIES}/dsdcc/src" CACHE INTERNAL "") if (WIN32) @@ -759,7 +766,7 @@ ExternalProject_Add(apt ) ExternalProject_Get_Property(apt source_dir binary_dir) set(APT_DEPENDS apt CACHE INTERNAL "") -set(APT_FOUND ON CACHE INTERNAL "") +set_global_cache(APT_FOUND ON) set(APT_EXTERNAL ON CACHE INTERNAL "") set(APT_INCLUDE_DIR "${EXTERNAL_BUILD_LIBRARIES}/apt/src/apt/src" CACHE INTERNAL "") if (WIN32) @@ -790,7 +797,7 @@ ExternalProject_Add(sgp4 ) ExternalProject_Get_Property(sgp4 source_dir binary_dir) set(SGP4_DEPENDS sgp4 CACHE INTERNAL "") -set(SGP4_FOUND ON CACHE INTERNAL "") +set_global_cache(SGP4_FOUND ON) set(SGP4_EXTERNAL ON CACHE INTERNAL "") set(SGP4_INCLUDE_DIR "${EXTERNAL_BUILD_LIBRARIES}/sgp4/src/sgp4/libsgp4" CACHE INTERNAL "") if (WIN32) @@ -818,7 +825,7 @@ if (WIN32) ) ExternalProject_Get_Property(pthreads4w source_dir binary_dir) set_global(PTHREADS4W_DEPENDS pthreads4w) - set(PTHREADS4W_FOUND ON CACHE INTERNAL "") + set_global_cache(PTHREADS4W_FOUND ON) set(PTHREADS4W_EXTERNAL ON CACHE INTERNAL "") set(PTHREADS4W_INCLUDE_DIR "${source_dir}" CACHE INTERNAL "") set(PTHREADS4W_LIBRARIES "${source_dir}/pthreadVC2.lib" CACHE INTERNAL "") @@ -875,7 +882,7 @@ if (ZLIB_FOUND AND FAAD_FOUND) endif(WIN32) ExternalProject_Get_Property(dab source_dir binary_dir) set_global(DAB_DEPENDS dab) - set(DAB_FOUND ON CACHE INTERNAL "") + set_global_cache(DAB_FOUND ON) set(DAB_EXTERNAL ON CACHE INTERNAL "") set(DAB_INCLUDE_DIR "${EXTERNAL_BUILD_LIBRARIES}/dab/src/dab" CACHE INTERNAL "") if (WIN32) @@ -895,7 +902,7 @@ if (LINUX) # apt install liblimesuite-dev (only on ubuntu 18.04). Can be picky on version though so let's build it. # needs pkgconfig and libusb if (NOT LIMESUITE_FOUND OR LIMESUITE_EXTERNAL) - set(LIMESUITE_FOUND ON CACHE INTERNAL "") + set_global_cache(LIMESUITE_FOUND ON) set(LIMESUITE_EXTERNAL ON CACHE INTERNAL "") set(LIMESUITE_INCLUDE_DIR "${EXTERNAL_BUILD_LIBRARIES}/limesuite/src/limesuite/src" CACHE INTERNAL "") set(LIMESUITE_LIBRARY "${EXTERNAL_BUILD_LIBRARIES}/lib${LIB_SUFFIX}/libLimeSuite.so" CACHE INTERNAL "") @@ -924,7 +931,7 @@ if (LINUX) # apt install libbladerf-dev # needs pkgconfig and libusb if (NOT LIBBLADERF_FOUND OR LIBBLADERF_EXTERNAL) - set(LIBBLADERF_FOUND ON CACHE INTERNAL "") + set_global_cache(LIBBLADERF_FOUND ON) set(LIBBLADERF_EXTERNAL ON CACHE INTERNAL "") set(LIBBLADERF_INCLUDE_DIRS "${EXTERNAL_BUILD_LIBRARIES}/bladerf/src/bladerf/host/libraries/libbladeRF/include" CACHE INTERNAL "") set(LIBBLADERF_LIBRARIES "${EXTERNAL_BUILD_LIBRARIES}/bladerf/src/bladerf-build/output/libbladeRF.so.2" CACHE INTERNAL "") @@ -945,7 +952,7 @@ if (LINUX) # apt install libiio-dev # needs pkgconfig, libusb, libxml2, lzma, xz, libiconv if (NOT LIBIIO_FOUND OR LIBIIO_EXTERNAL) - set(LIBIIO_FOUND ON CACHE INTERNAL "") + set_global_cache(LIBIIO_FOUND ON) set(LIBIIO_EXTERNAL ON CACHE INTERNAL "") set(LIBIIO_INCLUDE_DIR "${EXTERNAL_BUILD_LIBRARIES}/libiio/src/libiio" CACHE INTERNAL "") set(LIBIIO_LIBRARIES "${EXTERNAL_BUILD_LIBRARIES}/lib${LIB_SUFFIX}/libiio.so" CACHE INTERNAL "") @@ -967,7 +974,7 @@ if (LINUX) # apt install libairspyhf-dev (only on ubuntu 18.04) # needs libusb and pkgconfig if (NOT LIBAIRSPYHF_FOUND OR LIBAIRSPYHF_EXTERNAL) - set(LIBAIRSPYHF_FOUND ON CACHE INTERNAL "") + set_global_cache(LIBAIRSPYHF_FOUND ON) set(LIBAIRSPYHF_EXTERNAL ON CACHE INTERNAL "") set(LIBAIRSPYHF_LIBRARIES "${EXTERNAL_BUILD_LIBRARIES}/lib${LIB_SUFFIX}/libairspyhf.so" CACHE INTERNAL "") ExternalProject_Add(airspyhf @@ -986,7 +993,7 @@ if (LINUX) # needs pkgconfig, libusb, autoconf, automake and libtool if (NOT LIBPERSEUS_FOUND OR LIBPERSEUS_EXTERNAL) - set(LIBPERSEUS_FOUND ON CACHE INTERNAL "") + set_global_cache(LIBPERSEUS_FOUND ON) set(LIBPERSEUS_EXTERNAL ON CACHE INTERNAL "") set(LIBPERSEUS_INCLUDE_DIR "${EXTERNAL_BUILD_LIBRARIES}/perseus/src/perseus" CACHE INTERNAL "") set(LIBPERSEUS_LIBRARIES "${EXTERNAL_BUILD_LIBRARIES}/lib${LIB_SUFFIX}/libperseus-sdr.so" CACHE INTERNAL "") @@ -1004,7 +1011,7 @@ if (LINUX) # apt install librtlsdr-dev # needs pkgconfig and libusb if (NOT LIBRTLSDR_FOUND OR LIBRTLSDR_EXTERNAL) - set(LIBRTLSDR_FOUND ON CACHE INTERNAL "") + set_global_cache(LIBRTLSDR_FOUND ON) set(LIBRTLSDR_EXTERNAL ON CACHE INTERNAL "") set(LIBRTLSDR_INCLUDE_DIR "${EXTERNAL_BUILD_LIBRARIES}/rtlsdr/src/rtlsdr/include" CACHE INTERNAL "") set(LIBRTLSDR_LIBRARIES "${EXTERNAL_BUILD_LIBRARIES}/lib${LIB_SUFFIX}/librtlsdr.so" CACHE INTERNAL "") @@ -1022,7 +1029,7 @@ if (LINUX) # needs pkgconfig and libusb if (NOT LIBMIRISDR_FOUND OR LIBMIRISDR_EXTERNAL) - set(LIBMIRISDR_FOUND ON CACHE INTERNAL "") + set_global_cache(LIBMIRISDR_FOUND ON) set(LIBMIRISDR_EXTERNAL ON CACHE INTERNAL "") set(LIBMIRISDR_INCLUDE_DIR "${EXTERNAL_BUILD_LIBRARIES}/libmirisdr/src/libmirisdr/include" CACHE INTERNAL "") set(LIBMIRISDR_LIBRARIES "${EXTERNAL_BUILD_LIBRARIES}/lib${LIB_SUFFIX}/libmirisdr.so" CACHE INTERNAL "") @@ -1067,7 +1074,7 @@ if (WIN32 OR APPLE) TEST_COMMAND "" ) ExternalProject_Get_Property(rtlsdr source_dir binary_dir) - set(LIBRTLSDR_FOUND ON CACHE INTERNAL "") + set_global_cache(LIBRTLSDR_FOUND ON) set(LIBRTLSDR_EXTERNAL ON CACHE INTERNAL "") set(LIBRTLSDR_INCLUDE_DIR "${source_dir}/include" CACHE INTERNAL "") if (WIN32) @@ -1110,7 +1117,7 @@ if (WIN32 OR APPLE) TEST_COMMAND "" ) ExternalProject_Get_Property(limesuite source_dir binary_dir install_dir) - set(LIMESUITE_FOUND ON CACHE INTERNAL "") + set_global_cache(LIMESUITE_FOUND ON) set(LIMESUITE_EXTERNAL ON CACHE INTERNAL "") set(LIMESUITE_INCLUDE_DIR "${install_dir}/include" CACHE INTERNAL "") if (WIN32) @@ -1143,7 +1150,7 @@ if (WIN32 OR APPLE) TEST_COMMAND "" ) ExternalProject_Get_Property(soapysdr source_dir binary_dir) - set(SOAPYSDR_FOUND ON CACHE INTERNAL "") + set_global_cache(SOAPYSDR_FOUND ON) set(SOAPYSDR_EXTERNAL ON CACHE INTERNAL "") set(SOAPYSDR_INCLUDE_DIR "${source_dir}/include" CACHE INTERNAL "") if (WIN32) @@ -1186,7 +1193,7 @@ if (WIN32 OR APPLE) add_dependencies(airspy pthreads4w) endif () ExternalProject_Get_Property(airspy source_dir binary_dir) - set(LIBAIRSPY_FOUND ON CACHE INTERNAL "") + set_global_cache(LIBAIRSPY_FOUND ON) set(LIBAIRSPY_EXTERNAL ON CACHE INTERNAL "") set(LIBAIRSPY_INCLUDE_DIR "${source_dir}/libairspy/src" CACHE INTERNAL "") if (WIN32) @@ -1228,7 +1235,7 @@ if (WIN32 OR APPLE) add_dependencies(airspyhf pthreads4w) endif() ExternalProject_Get_Property(airspyhf source_dir binary_dir) - set(LIBAIRSPYHF_FOUND ON CACHE INTERNAL "") + set_global_cache(LIBAIRSPYHF_FOUND ON) set(LIBAIRSPYHF_EXTERNAL ON CACHE INTERNAL "") set(LIBAIRSPYHF_INCLUDE_DIR "${source_dir}/libairspyhf/src" CACHE INTERNAL "") if (WIN32) @@ -1273,7 +1280,7 @@ if (WIN32 OR APPLE) add_dependencies(hackrf pthreads4w) endif() ExternalProject_Get_Property(hackrf source_dir binary_dir) - set(LIBHACKRF_FOUND ON CACHE INTERNAL "") + set_global_cache(LIBHACKRF_FOUND ON) set(LIBHACKRF_EXTERNAL ON CACHE INTERNAL "") set(LIBHACKRF_INCLUDE_DIR "${source_dir}/host/libhackrf" CACHE INTERNAL "") if (WIN32) @@ -1319,7 +1326,7 @@ if (WIN32 OR APPLE) endif () ExternalProject_Get_Property(libxml2 source_dir binary_dir) set_global(LIBXML2_DEPENDS libxml2) - set(LIBXML2_FOUND ON CACHE INTERNAL "") + set_global_cache(LIBXML2_FOUND ON) set(LIBXML2_EXTERNAL ON CACHE INTERNAL "") if (WIN32) set(LIBXML2_INCLUDE_DIR "${source_dir}/include" CACHE INTERNAL "") @@ -1366,7 +1373,7 @@ if (WIN32 OR APPLE) add_dependencies(libiio pthreads4w) endif() ExternalProject_Get_Property(libiio source_dir binary_dir) - set(LIBIIO_FOUND ON CACHE INTERNAL "") + set_global_cache(LIBIIO_FOUND ON) set(LIBIIO_EXTERNAL ON CACHE INTERNAL "") set(LIBIIO_INCLUDE_DIR "${source_dir}" CACHE INTERNAL "") if (WIN32) @@ -1417,7 +1424,7 @@ if (WIN32 OR APPLE) add_dependencies(bladerf pthreads4w) endif() ExternalProject_Get_Property(bladerf source_dir binary_dir) - set(LIBBLADERF_FOUND ON CACHE INTERNAL "") + set_global_cache(LIBBLADERF_FOUND ON) set(LIBBLADERF_EXTERNAL ON CACHE INTERNAL "") set(LIBBLADERF_INCLUDE_DIRS "${source_dir}/host/libraries/libbladeRF/include" CACHE INTERNAL "") if (WIN32) @@ -1447,7 +1454,7 @@ if (WIN32 OR APPLE) TEST_COMMAND "" ) ExternalProject_Get_Property(uhd install_dir) - set(UHD_FOUND ON CACHE INTERNAL "") + set_global_cache(UHD_FOUND ON) set(UHD_EXTERNAL ON CACHE INTERNAL "") set(UHD_INCLUDE_DIR "${install_dir}/include" CACHE INTERNAL "") if (WIN32)