diff --git a/src/corelib/Qt6CoreDeploySupport.cmake b/src/corelib/Qt6CoreDeploySupport.cmake index 6db33d2609..24ddc47bcb 100644 --- a/src/corelib/Qt6CoreDeploySupport.cmake +++ b/src/corelib/Qt6CoreDeploySupport.cmake @@ -173,7 +173,7 @@ function(qt6_deploy_runtime_dependencies) set(arg_EXECUTABLE "${CMAKE_MATCH_1}") endif() elseif(arg_GENERATE_QT_CONF) - get_filename_component(exe_dir "${arg_EXECUTABLE}" DIRECTORY) + set(exe_dir "${QT_DEPLOY_BIN_DIR}") if(exe_dir STREQUAL "" OR exe_dir STREQUAL ".") set(exe_dir ".") set(prefix ".") diff --git a/src/corelib/Qt6CoreMacros.cmake b/src/corelib/Qt6CoreMacros.cmake index 3d7b911827..aefcc34838 100644 --- a/src/corelib/Qt6CoreMacros.cmake +++ b/src/corelib/Qt6CoreMacros.cmake @@ -2647,7 +2647,7 @@ qt6_deploy_runtime_dependencies( qt6_generate_deploy_script(${generate_args} CONTENT " qt6_deploy_runtime_dependencies( - EXECUTABLE \${QT_DEPLOY_BIN_DIR}/$ + EXECUTABLE $ GENERATE_QT_CONF )") diff --git a/src/corelib/doc/src/cmake/qt_deploy_runtime_dependencies.qdoc b/src/corelib/doc/src/cmake/qt_deploy_runtime_dependencies.qdoc index 6f950b4020..f199e62594 100644 --- a/src/corelib/doc/src/cmake/qt_deploy_runtime_dependencies.qdoc +++ b/src/corelib/doc/src/cmake/qt_deploy_runtime_dependencies.qdoc @@ -58,11 +58,10 @@ see \l{qt_deploy_qml_imports()} for that. The \c{EXECUTABLE} option must be provided. -The \c{executable} argument should be a path to the executable file, relative to -the base install location. For example, \c{bin/MyApp.exe}, or more dynamically -\c{\${QT_DEPLOY_BIN_DIR}/$}. -Specifying raw target names not wrapped in a generator epxression like -\c{} is not supported. +The \c{executable} argument should be the path to the executable file in the +build directory. For example, \c{${CMAKE_CURRENT_BINARY_DIR}/MyApp.exe}, or more +dynamically \c{$}. Specifying raw target names not wrapped in +a generator expression like \c{} is not supported. For macOS app bundles, the \c{executable} argument should be a path to the bundle directory, relative to the base install location.