From 7105dffb6391e390379ee94fa731de7e4fd67ed9 Mon Sep 17 00:00:00 2001 From: Peter Petrik Date: Thu, 28 Jan 2021 14:33:43 +0100 Subject: [PATCH] fix GRASS7 provider build on MacOS (#41207) * fix GRASS7 provider build on MacOS --- src/providers/grass/CMakeLists.txt | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/src/providers/grass/CMakeLists.txt b/src/providers/grass/CMakeLists.txt index eef8abef0690..7f2a4e3f89e8 100644 --- a/src/providers/grass/CMakeLists.txt +++ b/src/providers/grass/CMakeLists.txt @@ -77,15 +77,23 @@ macro(ADD_GRASSLIB GRASS_BUILD_VERSION) set(GRASS_OFF_T_SIZE_DEF "") endif() - set_target_properties(qgisgrass${GRASS_BUILD_VERSION} PROPERTIES - CLEAN_DIRECT_OUTPUT 1 - FRAMEWORK QGIS_MACAPP_FRAMEWORK - FRAMEWORK_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}" - MACOSX_FRAMEWORK_INFO_PLIST "${CMAKE_SOURCE_DIR}/mac/framework.info.plist.in" - MACOSX_FRAMEWORK_SHORT_VERSION_STRING ${COMPLETE_VERSION} - MACOSX_FRAMEWORK_IDENTIFIER org.qgis.qgis3_grass - COMPILE_FLAGS "-DGRASS_BASE=\\\"${GRASS_PREFIX}\\\" ${GRASS_OFF_T_SIZE_DEF}" - ) + if(QGIS_MACAPP_FRAMEWORK) + set_target_properties(qgisgrass${GRASS_BUILD_VERSION} PROPERTIES + CLEAN_DIRECT_OUTPUT 1 + FRAMEWORK 1 + FRAMEWORK_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}" + MACOSX_FRAMEWORK_INFO_PLIST "${CMAKE_SOURCE_DIR}/mac/framework.info.plist.in" + MACOSX_FRAMEWORK_SHORT_VERSION_STRING ${COMPLETE_VERSION} + MACOSX_FRAMEWORK_IDENTIFIER org.qgis.qgis3_grass + COMPILE_FLAGS "-DGRASS_BASE=\\\"${GRASS_PREFIX}\\\" ${GRASS_OFF_T_SIZE_DEF}" + ) + else() + set_target_properties(qgisgrass${GRASS_BUILD_VERSION} PROPERTIES + CLEAN_DIRECT_OUTPUT 1 + FRAMEWORK 0 + COMPILE_FLAGS "-DGRASS_BASE=\\\"${GRASS_PREFIX}\\\" ${GRASS_OFF_T_SIZE_DEF}" + ) + endif() if (APPLE) set_target_properties(qgisgrass${GRASS_BUILD_VERSION} PROPERTIES