Deploy¶
Gathering what a built or an installed binary needs to run, and putting it beside the binary. Windows is done after a build and every platform can be done during an install.
Warning
This module depends on qmcorecmd after installation.
- qm_win_applocal_deps¶
Automatically copy dependencies for Windows Executables after build.
qm_win_applocal_deps(<target> [CUSTOM_TARGET <target>] [FORCE] [VERBOSE] [EXTRA_SEARCHING_PATHS <path...>] [OUTPUT_DIR <dir>] [EXCLUDE <pattern...>] )
Does nothing where the platform is not Windows, so a call needs no guard around it.
See also
qm_deploy_directory(), for the same thing done while installing rather than after building.
- qm_deploy_directory¶
Add a deploy command when installing the project. Not for a debug build.
qm_deploy_directory(<install_dir> [FORCE] [STANDARD] [VERBOSE] [LIBRARY_DIR <dir>] [EXTRA_LIBRARIES <path>...] [EXTRA_PLUGIN_PATHS <path>...] [EXTRA_SEARCHING_PATHS <path>...] [PLUGINS <plugin>...] [PLUGIN_DIR <dir>] [QML <qml>...] [QML_DIR <dir>] [COMMENT <comment>] )
PLUGINSQt plugins, in format of
<category>/<name>PLUGIN_DIRQt plugins destination
EXTRA_PLUGIN_PATHSExtra Qt plugins searching paths
QMLQt qml directories
QML_DIRQt qml destination
LIBRARY_DIRLibrary destination
EXTRA_LIBRARIESExtra library names list to deploy
EXTRA_SEARCHING_PATHSExtra library searching paths
What it gathers is the release flavour of everything, and that is decided in the scripts underneath rather than here. A plugin is looked for by the name it was given, so
iconengines/qsvgiconfindsqsvgicon.dlland neverqsvgicond.dll, and a debug build beside a release one is turned down on sight. Unix leaves out anything whose name carriesdebug, which is how a macOS framework spells its debug library.So nothing stops this being called in a debug build, and what it leaves is a release deployment. Nothing here reads the configuration, and the note above is the whole of the enforcement.
QMLis the one thing here that cannot be asked for without a Qt, the modules being named relative to a directory only qmake can say where is.PLUGINSgivenEXTRA_PLUGIN_PATHSnever reaches qmake.Note
Where qmake is wanted it has to be found first, which
qm_find_qt()with any component is the short way to. A call that needs it and does not have it stops with an error saying so.EXTRA_LIBRARIESis matched against what is on disk while the project is being read, so it names neither a target of this build nor a generator expression.
Where this page comes from
The comments in cmake/modules/Deploy.cmake, which is what to change.