diff options
author | Joerg Bornemann <joerg.bornemann@qt.io> | 2022-09-02 12:53:40 +0200 |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@qt.io> | 2022-09-12 07:36:12 +0200 |
commit | 542f837fa2bc5d6009e966c7fa9d7909cef22d2d (patch) | |
tree | 33f993177e967ddb0900fa45c8ce3233885c9725 /src/corelib/doc | |
parent | c288733541b7842f0aa91dba378a00e6c158fa6e (diff) |
CMake: Clarify qt_deploy_runtime_dependencies' EXECUTABLE argument
In a subsequent commit we will add Linux support for
qt_deploy_runtime_dependencies based on file(GET_RUNTIME_DEPENDENCIES).
The file(GRD) command expects that we pass the not-yet-installed
executable to it, because the command reads the RUNPATH/RPATH from the
executable and resolves libraries against these paths. This resolution
is likely going to fail if file(GRD) is run on an installed executable,
because the RPATH was modified to be relocatable in the installation
phase.
This patch adds a recommendation to use the build directory's executable
for qt_deploy_runtime_dependencies on non-macOS platforms.
Also, the Windows code path of qt_deploy_runtime_dependencies is
adjusted to support both, the .exe in the build dir and the .exe in the
installation prefix.
For consistency, qt_generate_deploy_app_script calls
qt_deploy_runtime_dependencies with EXECUTABLE pointing to the build
directory's executable.
[ChangeLog][CMake] On non-macOS platforms,
qt_deploy_runtime_dependencies' EXECUTABLE argument now expects the
executable in the build directory instead of the installation directory.
Change-Id: Id76b52cc5a0f285586679d7ae600a8c7996429c1
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'src/corelib/doc')
-rw-r--r-- | src/corelib/doc/src/cmake/qt_deploy_runtime_dependencies.qdoc | 9 |
1 files changed, 4 insertions, 5 deletions
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}/$<TARGET_FILE_NAME:MyApp>}. -Specifying raw target names not wrapped in a generator epxression like -\c{<TARGET_FILE_NAME:>} 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{$<TARGET_FILE:MyApp>}. Specifying raw target names not wrapped in +a generator expression like \c{<TARGET_FILE:>} 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. |