From fee15182949e88682131399c50b679be83a75385 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Mon, 12 Feb 2024 11:57:34 +0100 Subject: [PATCH] Enable frameworks by default for shared library builds on Apple platforms Many modern features of the Apple application build and packaging pipeline require that the libraries are shipped as frameworks, so that they can embed resources (privacy manifest e.g.), be signed, and have their own Info.plist. We build and ship our binary packages already as frameworks, and it has been the default for release builds for a while. Let's enable it for debug builds as well, so that developers are testing what we ship (debug is the default for -developer-build). The error about debug builds not being compatible with frameworks has been removed, as this works fine in practice. With CMake we don't add a '_debug' suffix to the libraries unconditionally for debug builds. Change-Id: I373b982affd8cf70b215d4a92225467ff1037fe8 Reviewed-by: Alexandru Croitor --- configure.cmake | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/configure.cmake b/configure.cmake index 1ccd9bbfc1f..a7c7b57113b 100644 --- a/configure.cmake +++ b/configure.cmake @@ -563,7 +563,7 @@ qt_feature("headersclean" qt_feature_config("headersclean" QMAKE_PRIVATE_CONFIG) qt_feature("framework" PUBLIC LABEL "Build Apple Frameworks" - CONDITION APPLE AND BUILD_SHARED_LIBS AND NOT CMAKE_BUILD_TYPE STREQUAL Debug + CONDITION APPLE AND BUILD_SHARED_LIBS ) qt_feature_definition("framework" "QT_MAC_FRAMEWORK_BUILD") qt_feature_config("framework" QMAKE_PUBLIC_QT_CONFIG @@ -1231,11 +1231,6 @@ qt_configure_add_report_entry( MESSAGE "-debug-and-release is only supported on Darwin and Windows platforms. Qt can be built in release mode with separate debug information, so -debug-and-release is no longer necessary." CONDITION INPUT_debug_and_release STREQUAL 'yes' AND NOT APPLE AND NOT WIN32 ) -qt_configure_add_report_entry( - TYPE ERROR - MESSAGE "debug-only framework builds are not supported. Configure with -no-framework if you want a pure debug build." - CONDITION QT_FEATURE_framework AND QT_FEATURE_debug AND NOT QT_FEATURE_debug_and_release -) qt_configure_add_report_entry( TYPE ERROR MESSAGE "Static builds don't support RPATH"