CMake: Allow enabling Apple app extension API in other repos

It's needed in qtconnectivity, but currently the
qt_disable_apple_app_extension_api_only function is defined in
QtInternalTargets.cmake which is loaded only in qtbase.

Move the function to cmake/QtTargetHelpers.cmake.

Amends e189126f1ae1d2fa2ad0f95ee2c4aa72c770a97b

Pick-to: 6.1
Change-Id: Ia2470e48a91385239394368780f5bbb223000113
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
This commit is contained in:
Alexandru Croitor 2021-04-22 09:55:55 +02:00
parent 7c65935810
commit 393f45de90
2 changed files with 4 additions and 3 deletions

View File

@ -318,8 +318,5 @@ function(qt_handle_apple_app_extension_api_only)
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()

View File

@ -580,3 +580,7 @@ function(qt_internal_force_macos_intel_arch target)
set_target_properties(${target} PROPERTIES OSX_ARCHITECTURES "${arches}")
endif()
endfunction()
function(qt_disable_apple_app_extension_api_only target)
set_target_properties("${target}" PROPERTIES QT_NO_APP_EXTENSION_ONLY_API TRUE)
endfunction()