summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cmake/QtInternalTargets.cmake19
-rw-r--r--src/plugins/platforms/cocoa/CMakeLists.txt4
-rw-r--r--src/plugins/platforms/ios/CMakeLists.txt4
-rw-r--r--src/plugins/platforms/xcb/CMakeLists.txt4
4 files changed, 31 insertions, 0 deletions
diff --git a/cmake/QtInternalTargets.cmake b/cmake/QtInternalTargets.cmake
index c570771202..bf4d33126c 100644
--- a/cmake/QtInternalTargets.cmake
+++ b/cmake/QtInternalTargets.cmake
@@ -204,3 +204,22 @@ function(qt_auto_detect_fpmath)
endif()
endfunction()
qt_auto_detect_fpmath()
+
+function(qt_handle_apple_app_extension_api_only)
+ if(APPLE)
+ # Build Qt libraries with -fapplication-extension. Needed to avoid linker warnings
+ # transformed into errors on darwin platforms.
+ set(flags "-fapplication-extension")
+ set(genex_condition "$<NOT:$<BOOL:$<TARGET_PROPERTY:QT_NO_APP_EXTENSION_ONLY_API>>>")
+ set(flags "$<${genex_condition}:${flags}>")
+ target_compile_options(PlatformModuleInternal INTERFACE ${flags})
+ target_link_options(PlatformModuleInternal INTERFACE ${flags})
+ target_compile_options(PlatformPluginInternal INTERFACE ${flags})
+ target_link_options(PlatformPluginInternal INTERFACE ${flags})
+ endif()
+endfunction()
+function(qt_disable_apple_app_extension_api_only target)
+ set_target_properties("${target}" PROPERTIES QT_NO_APP_EXTENSION_ONLY_API TRUE)
+endfunction()
+
+qt_handle_apple_app_extension_api_only()
diff --git a/src/plugins/platforms/cocoa/CMakeLists.txt b/src/plugins/platforms/cocoa/CMakeLists.txt
index ce4c245a17..c4750113f1 100644
--- a/src/plugins/platforms/cocoa/CMakeLists.txt
+++ b/src/plugins/platforms/cocoa/CMakeLists.txt
@@ -63,6 +63,10 @@ qt_internal_add_plugin(QCocoaIntegrationPlugin
Qt::ThemeSupportPrivate
)
+# special case begin
+qt_disable_apple_app_extension_api_only(QCocoaIntegrationPlugin)
+# special case end
+
# Resources:
set(qcocoaresources_resource_files
"images/sizeallcursor.png"
diff --git a/src/plugins/platforms/ios/CMakeLists.txt b/src/plugins/platforms/ios/CMakeLists.txt
index e7925b5282..0236f0d27d 100644
--- a/src/plugins/platforms/ios/CMakeLists.txt
+++ b/src/plugins/platforms/ios/CMakeLists.txt
@@ -37,6 +37,10 @@ add_qt_plugin(QIOSIntegrationPlugin
Qt::GuiPrivate
)
+# special case begin
+qt_disable_apple_app_extension_api_only(QIOSIntegrationPlugin)
+# special case end
+
#### Keys ignored in scope 1:.:.:kernel.pro:<TRUE>:
# OTHER_FILES = "quiview_textinput.mm" "quiview_accessibility.mm"
diff --git a/src/plugins/platforms/xcb/CMakeLists.txt b/src/plugins/platforms/xcb/CMakeLists.txt
index 278ef82cb8..1d481832f1 100644
--- a/src/plugins/platforms/xcb/CMakeLists.txt
+++ b/src/plugins/platforms/xcb/CMakeLists.txt
@@ -64,6 +64,10 @@ qt_add_module(XcbQpa
XKB::XKB
)
+# special case begin
+qt_disable_apple_app_extension_api_only(XcbQpa)
+# special case end
+
## Scopes:
#####################################################################