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

Change-Id: Ia2470e48a91385239394368780f5bbb223000113
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 393f45de907d8c6bca9bdb33d08a6309034c89f5)
This commit is contained in:
Alexandru Croitor 2021-04-22 09:55:55 +02:00
parent 8abe8384f6
commit 21346d17c3
2 changed files with 4 additions and 3 deletions

View File

@ -317,8 +317,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

@ -558,3 +558,7 @@ function(qt_internal_install_pdb_files target install_dir_path)
endif()
endif()
endfunction()
function(qt_disable_apple_app_extension_api_only target)
set_target_properties("${target}" PROPERTIES QT_NO_APP_EXTENSION_ONLY_API TRUE)
endfunction()