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 <alexandru.croitor@qt.io>
This commit is contained in:
Tor Arne Vestbø 2024-02-12 11:57:34 +01:00
parent 5a032f0b3f
commit fee1518294

View File

@ -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"