From 54fab97b6b64d109cb0bf6e5629d442ff1c6e328 Mon Sep 17 00:00:00 2001 From: Sam Gillingham Date: Tue, 2 Feb 2021 09:21:15 +1000 Subject: [PATCH] add QGIS_INSTALL_SYS_LIBS cmake option --- CMakeLists.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 533169051bd..5ca691c219d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -911,6 +911,8 @@ if (DISABLE_DEPRECATED) add_definitions(-DQGIS_DISABLE_DEPRECATED) endif() +# whether to install required system libs in the output package +set(QGIS_INSTALL_SYS_LIBS TRUE CACHE BOOL "If set to TRUE install all required system libs in the output package") ############################################################# # Python build dependency @@ -1073,7 +1075,10 @@ if (WITH_CORE) if(NOT DEFINED CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS) set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS ON) endif() - include(InstallRequiredSystemLibraries) + + if(QGIS_INSTALL_SYS_LIBS) + include(InstallRequiredSystemLibraries) + endif() set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "QGIS") set(CPACK_PACKAGE_VENDOR "Open Source Geospatial Foundation")