cmake: Allow static library framework builds for macOS and iOS
Frameworks on Apple systems have traditionally been wrappers around dynamic libraries (with headers and other resources bundled alongside the library), but nowadays it's fully supported to have frameworks with static libraries inside them. Enabling this allows us to build Qt for iOS statically, but as frameworks, which allows us to include privacy manifests for the Qt libraries in the frameworks. At build time Xcode will link the static library into the application, as normal, so nothing changes there. If the user then chooses to embed the Qt frameworks via the Xcode UI, the build system will not copy the static libraries inside the frameworks, but will copy the privacy manifest and other resources, which in turn allows Xcode to generate a privacy report for the application as a whole. Task-number: QTBUG-114319 Change-Id: Ibc8c70a97d288e27811eaedd242613fa206617e5 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
parent
5c05f5cd7f
commit
291817b0bf
@ -563,7 +563,8 @@ qt_feature("headersclean"
|
|||||||
qt_feature_config("headersclean" QMAKE_PRIVATE_CONFIG)
|
qt_feature_config("headersclean" QMAKE_PRIVATE_CONFIG)
|
||||||
qt_feature("framework" PUBLIC
|
qt_feature("framework" PUBLIC
|
||||||
LABEL "Build Apple Frameworks"
|
LABEL "Build Apple Frameworks"
|
||||||
CONDITION APPLE AND BUILD_SHARED_LIBS
|
AUTODETECT BUILD_SHARED_LIBS
|
||||||
|
CONDITION APPLE
|
||||||
)
|
)
|
||||||
qt_feature_definition("framework" "QT_MAC_FRAMEWORK_BUILD")
|
qt_feature_definition("framework" "QT_MAC_FRAMEWORK_BUILD")
|
||||||
qt_feature_config("framework" QMAKE_PUBLIC_QT_CONFIG
|
qt_feature_config("framework" QMAKE_PUBLIC_QT_CONFIG
|
||||||
|
Loading…
x
Reference in New Issue
Block a user