From 20da4d86a763bf07519c79babef57fcd0f48f59f Mon Sep 17 00:00:00 2001 From: Matthias Kuhn Date: Fri, 25 Oct 2024 18:23:20 +0200 Subject: [PATCH] Fix PREFER_INTERNAL_LIBS --- CMakeLists.txt | 6 +++--- src/core/CMakeLists.txt | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ab0d71d0312e..ed4a9fb9311b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -275,8 +275,8 @@ if(WITH_CORE) endif() # try to configure and build POLY2TRI support - set (WITH_INTERNAL_POLY2TRI PREFER_INTERNAL_LIBS CACHE BOOL "Determines whether POLY2TRI should be built from internal copy") - set (WITH_INTERNAL_MESHOPTIMIZER PREFER_INTERNAL_LIBS CACHE BOOL "Determines whether MESHOPTIMIZER should be built from internal copy") + set (WITH_INTERNAL_POLY2TRI ${PREFER_INTERNAL_LIBS} CACHE BOOL "Determines whether POLY2TRI should be built from internal copy") + set (WITH_INTERNAL_MESHOPTIMIZER ${PREFER_INTERNAL_LIBS} CACHE BOOL "Determines whether MESHOPTIMIZER should be built from internal copy") # try to configure and build POSTGRESQL support set (WITH_POSTGRESQL TRUE CACHE BOOL "Determines whether POSTGRESQL support should be built") @@ -389,7 +389,7 @@ if(WITH_CORE) find_package(EXPAT REQUIRED) find_package(Spatialindex REQUIRED) find_package(LibZip REQUIRED) - set (WITH_INTERNAL_NLOHMANN_JSON PREFER_INTERNAL_LIBS CACHE BOOL "Determines whether the vendored copy of nlohmann-json should be used") + set (WITH_INTERNAL_NLOHMANN_JSON ${PREFER_INTERNAL_LIBS} CACHE BOOL "Determines whether the vendored copy of nlohmann-json should be used") find_package(nlohmann_json REQUIRED) # The following bypasses the FindSQLite3 module introduced in CMake 3.14 diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index d333c406f85f..b877c552054a 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -2348,7 +2348,7 @@ if(WITH_INTERNAL_MESHOPTIMIZER) ) else() find_package(meshoptimizer CONFIG REQUIRED) - target_link_libraries(qgis_core PRIVATE meshoptimizer::meshoptimizer) + target_link_libraries(qgis_core meshoptimizer::meshoptimizer) endif() # require c++17