From 5f270bfb26189913d5131da6e2159a2d408c6c0e Mon Sep 17 00:00:00 2001 From: Peter Kokot Date: Wed, 5 Mar 2025 00:08:02 +0100 Subject: [PATCH] DeployQt4: Update documentation - Module functions listed using the usual RST docs blocks - The `FIXUP_QT4_BUNDLE` typo fixed to `fixup_qt4_executable` - Typos and some minor readability improvements added - Mention of usage requirements (CMake 2.6, BundleUtilities) at the beginning removed --- Modules/DeployQt4.cmake | 153 +++++++++++++++++++++++----------------- 1 file changed, 88 insertions(+), 65 deletions(-) diff --git a/Modules/DeployQt4.cmake b/Modules/DeployQt4.cmake index 39443cf767..c94be82361 100644 --- a/Modules/DeployQt4.cmake +++ b/Modules/DeployQt4.cmake @@ -5,102 +5,125 @@ DeployQt4 --------- -Functions to help assemble a standalone Qt4 executable. +This module provides a collection of CMake utility functions useful for +assembling and deploying standalone Qt4 executables. -A collection of CMake utility functions useful for deploying Qt4 -executables. +Functions +^^^^^^^^^ -The following functions are provided by this module: +This module defines the following functions: -:: +* :command:`write_qt4_conf` +* :command:`resolve_qt4_paths` +* :command:`fixup_qt4_executable` +* :command:`install_qt4_plugin_path` +* :command:`install_qt4_plugin` +* :command:`install_qt4_executable` - write_qt4_conf - resolve_qt4_paths - fixup_qt4_executable - install_qt4_plugin_path - install_qt4_plugin - install_qt4_executable +.. command:: write_qt4_conf -Requires CMake 2.6 or greater because it uses function and -PARENT_SCOPE. Also depends on BundleUtilities.cmake. + .. code-block:: cmake -.. code-block:: cmake + write_qt4_conf( ) - write_qt4_conf( ) + Writes a ``qt.conf`` file with the ```` into the + ```` directory. -Writes a qt.conf file with the into . +.. command:: resolve_qt4_paths -.. code-block:: cmake + .. code-block:: cmake - resolve_qt4_paths( []) + resolve_qt4_paths( []) -Loop through list and if any don't exist resolve them -relative to the (if supplied) or the -CMAKE_INSTALL_PREFIX. + Loops through the ```` list and if any path doesn't exist, it + resolves them relative to the ```` (if supplied) or the + :variable:`CMAKE_INSTALL_PREFIX`. -.. code-block:: cmake +.. command:: fixup_qt4_executable - fixup_qt4_executable( - [ ]) + .. code-block:: cmake -Copies Qt plugins, writes a Qt configuration file (if needed) and -fixes up a Qt4 executable using BundleUtilities so it is standalone -and can be drag-and-drop copied to another machine as long as all of -the system libraries are compatible. + fixup_qt4_executable( + + [ ] + ) - should point to the executable to be fixed-up. + Copies Qt plugins, writes a Qt configuration file (if needed) and fixes up a + Qt4 executable using the :module:`BundleUtilities` module so it is standalone + and can be drag-and-drop copied to another machine as long as all of the + system libraries are compatible. - should contain a list of the names or paths of any Qt -plugins to be installed. + ```` should point to the executable to be fixed-up. - will be passed to BundleUtilities and should be a list of any -already installed plugins, libraries or executables to also be -fixed-up. + ```` should contain a list of the names or paths of any Qt plugins + to be installed. - will be passed to BundleUtilities and should contain and -directories to be searched to find library dependencies. + ```` will be passed to the :module:`BundleUtilities` module and should + be a list of any already installed plugins, libraries or executables to also + be fixed-up. - allows an custom plugins directory to be used. + ```` will be passed to the :module:`BundleUtilities` module and should + contain directories to be searched to find library dependencies. - will force a qt.conf file to be written even if not -needed. + ```` allows a custom plugins directory to be used. -.. code-block:: cmake + ```` will force a ``qt.conf`` file to be written even if not + needed. - install_qt4_plugin_path(plugin executable copy installed_plugin_path_var - ) +.. command:: install_qt4_plugin_path -Install (or copy) a resolved to the default plugins directory -(or ) relative to and store the result in -. + .. code-block:: cmake -If is set to TRUE then the plugins will be copied rather than -installed. This is to allow this module to be used at CMake time -rather than install time. + install_qt4_plugin_path( + + + + + [ ] + ) -If is set then anything installed will use this COMPONENT. + Installs (or copies) a resolved ```` to the default plugins directory + (or ````) relative to ```` and stores the result in + a variable ````. -.. code-block:: cmake + If ```` is set to ``TRUE`` then the plugins will be copied rather than + installed. This is to allow this module to be used at CMake time rather than + install time. - install_qt4_plugin(plugin executable copy installed_plugin_path_var - ) + If ```` is set then anything installed will use this COMPONENT. -Install (or copy) an unresolved to the default plugins -directory (or ) relative to and store the -result in . See documentation of -INSTALL_QT4_PLUGIN_PATH. +.. command:: install_qt4_plugin -.. code-block:: cmake + .. code-block:: cmake - install_qt4_executable( - [ ]) + install_qt4_plugin( + + + + + [ ] + ) -Installs Qt plugins, writes a Qt configuration file (if needed) and -fixes up a Qt4 executable using BundleUtilities so it is standalone -and can be drag-and-drop copied to another machine as long as all of -the system libraries are compatible. The executable will be fixed-up -at install time. is the COMPONENT used for bundle fixup -and plugin installation. See documentation of FIXUP_QT4_BUNDLE. + Installs (or copies) an unresolved ```` to the default plugins + directory (or ````) relative to ```` and stores the + result in a variable ````. For other arguments, + see also :command:`install_qt4_plugin_path`. + +.. command:: install_qt4_executable + + .. code-block:: cmake + + install_qt4_executable( + + [ ] + ) + + Installs Qt plugins, writes a Qt configuration file (if needed) and fixes up a + Qt4 executable using the :module:`BundleUtilities` module so it is standalone + and can be drag-and-drop copied to another machine as long as all of the + system libraries are compatible. The executable will be fixed-up at install + time. ```` is the COMPONENT used for bundle fixup and plugin + installation. For other arguments, see also :command:`fixup_qt4_executable`. #]=======================================================================] # The functions defined in this file depend on the fixup_bundle function