diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2022-02-17 16:14:09 +0100 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2022-02-28 23:08:20 +0100 |
commit | 0ada264dda533cd3be2699330a5c1e2dd27a0e6a (patch) | |
tree | d3518b56f25fdbded7b21acc243499e4a1d5dca8 /src/corelib/Qt6CoreDeploySupport.cmake | |
parent | 6ee4f4233dcfe2b12058c7c33433551f3bd89487 (diff) |
CMake: Clean up qt_deploy_runtime_dependencies for 6.3
Ensure both versioned and versionless functions
are available.
Use the versioned function in the implementation of
qt6_generate_deploy_app_script.
Move the low-level warning to the top of the documentation page,
after the TP message.
Clarify documentation of the EXECUTABLE and
ADDITIONAL_ options, that they take relative paths and can use
generator expressions, but can't reference raw target names.
Adjust documentation snippet to cover mac / windows cases.
This mostly coincides with the internal implementation of
qt_generate_deploy_app_script.
Also adjust it to show case more options, like installation of a
helper app and its dependencies.
Output the working directory when executing the deploy tool.
Remove the MACOS_BUNDLE option, it serves no good purpose at the
moment, we already detect bundles by checking if the dir name has
an '.app' suffix.
Pick-to: 6.3
Fixes: QTBUG-100923
Change-Id: If7e5d65ce920eb69fd45f004aa4c5bad800c7ba9
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'src/corelib/Qt6CoreDeploySupport.cmake')
-rw-r--r-- | src/corelib/Qt6CoreDeploySupport.cmake | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/src/corelib/Qt6CoreDeploySupport.cmake b/src/corelib/Qt6CoreDeploySupport.cmake index f3318ce404..a9d2dfe955 100644 --- a/src/corelib/Qt6CoreDeploySupport.cmake +++ b/src/corelib/Qt6CoreDeploySupport.cmake @@ -104,14 +104,13 @@ endif() # This function is currently in Technical Preview. # Its signature and behavior might change. -function(qt_deploy_runtime_dependencies) +function(qt6_deploy_runtime_dependencies) if(NOT __QT_DEPLOY_TOOL) message(FATAL_ERROR "No Qt deploy tool available for this target platform") endif() set(no_value_options - MACOS_BUNDLE GENERATE_QT_CONF VERBOSE NO_OVERWRITE @@ -162,7 +161,7 @@ function(qt_deploy_runtime_dependencies) # macdeployqt always writes out a qt.conf file. It will complain if one # already exists, so leave it to create it for us if we will be running it. - if(MACOS_BUNDLE AND __QT_DEPLOY_SYSTEM_NAME STREQUAL Darwin) + if(__QT_DEPLOY_SYSTEM_NAME STREQUAL Darwin) # We might get EXECUTABLE pointing to either the actual binary under the # Contents/MacOS directory, or it might be pointing to the top of the # app bundle (i.e. the <appname>.app directory). We want the latter to @@ -239,7 +238,8 @@ function(qt_deploy_runtime_dependencies) list(APPEND tool_options "${extra_binaries_option}${extra_binary}") endforeach() - message(STATUS "Running Qt deploy tool for ${arg_EXECUTABLE}") + message(STATUS + "Running Qt deploy tool for ${arg_EXECUTABLE} in working directory '${QT_DEPLOY_PREFIX}'") execute_process( COMMAND_ECHO STDOUT COMMAND "${__QT_DEPLOY_TOOL}" "${arg_EXECUTABLE}" ${tool_options} @@ -252,6 +252,16 @@ function(qt_deploy_runtime_dependencies) endfunction() +if(NOT __QT_NO_CREATE_VERSIONLESS_FUNCTIONS) + function(qt_deploy_runtime_dependencies) + if(__QT_DEFAULT_MAJOR_VERSION EQUAL 6) + qt6_deploy_runtime_dependencies(${ARGV}) + else() + message(FATAL_ERROR "qt_deploy_runtime_dependencies() is only available in Qt 6.") + endif() + endfunction() +endif() + function(_qt_internal_show_skip_runtime_deploy_message qt_build_type_string) message(STATUS "Skipping runtime deployment steps. " |