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
This commit is contained in:
Peter Kokot
2025-03-05 00:08:02 +01:00
parent 7e2f2c9bfb
commit 5f270bfb26

View File

@@ -5,102 +5,125 @@
DeployQt4 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 Functions
executables. ^^^^^^^^^
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 .. command:: write_qt4_conf
resolve_qt4_paths
fixup_qt4_executable
install_qt4_plugin_path
install_qt4_plugin
install_qt4_executable
Requires CMake 2.6 or greater because it uses function and .. code-block:: cmake
PARENT_SCOPE. Also depends on BundleUtilities.cmake.
.. code-block:: cmake write_qt4_conf(<qt_conf_dir> <qt_conf_contents>)
write_qt4_conf(<qt_conf_dir> <qt_conf_contents>) Writes a ``qt.conf`` file with the ``<qt_conf_contents>`` into the
``<qt_conf_dir>`` directory.
Writes a qt.conf file with the <qt_conf_contents> into <qt_conf_dir>. .. command:: resolve_qt4_paths
.. code-block:: cmake .. code-block:: cmake
resolve_qt4_paths(<paths_var> [<executable_path>]) resolve_qt4_paths(<paths_var> [<executable_path>])
Loop through <paths_var> list and if any don't exist resolve them Loops through the ``<paths_var>`` list and if any path doesn't exist, it
relative to the <executable_path> (if supplied) or the resolves them relative to the ``<executable_path>`` (if supplied) or the
CMAKE_INSTALL_PREFIX. :variable:`CMAKE_INSTALL_PREFIX`.
.. code-block:: cmake .. command:: fixup_qt4_executable
fixup_qt4_executable(<executable> .. code-block:: cmake
[<qtplugins> <libs> <dirs> <plugins_dir> <request_qt_conf>])
Copies Qt plugins, writes a Qt configuration file (if needed) and fixup_qt4_executable(
fixes up a Qt4 executable using BundleUtilities so it is standalone <executable>
and can be drag-and-drop copied to another machine as long as all of [<qtplugins> <libs> <dirs> <plugins_dir> <request_qt_conf>]
the system libraries are compatible. )
<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.
<qtplugins> should contain a list of the names or paths of any Qt ``<executable>`` should point to the executable to be fixed-up.
plugins to be installed.
<libs> will be passed to BundleUtilities and should be a list of any ``<qtplugins>`` should contain a list of the names or paths of any Qt plugins
already installed plugins, libraries or executables to also be to be installed.
fixed-up.
<dirs> will be passed to BundleUtilities and should contain and ``<libs>`` will be passed to the :module:`BundleUtilities` module and should
directories to be searched to find library dependencies. be a list of any already installed plugins, libraries or executables to also
be fixed-up.
<plugins_dir> allows an custom plugins directory to be used. ``<dirs>`` will be passed to the :module:`BundleUtilities` module and should
contain directories to be searched to find library dependencies.
<request_qt_conf> will force a qt.conf file to be written even if not ``<plugins_dir>`` allows a custom plugins directory to be used.
needed.
.. code-block:: cmake ``<request_qt_conf>`` 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
<plugins_dir> <component> <configurations>)
Install (or copy) a resolved <plugin> to the default plugins directory .. code-block:: cmake
(or <plugins_dir>) relative to <executable> and store the result in
<installed_plugin_path_var>.
If <copy> is set to TRUE then the plugins will be copied rather than install_qt4_plugin_path(
installed. This is to allow this module to be used at CMake time <plugin>
rather than install time. <executable>
<copy>
<installed_plugin_path_var>
[<plugins_dir> <component> <configurations>]
)
If <component> is set then anything installed will use this COMPONENT. Installs (or copies) a resolved ``<plugin>`` to the default plugins directory
(or ``<plugins_dir>``) relative to ``<executable>`` and stores the result in
a variable ``<installed_plugin_path_var>``.
.. code-block:: cmake If ``<copy>`` 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 ``<component>`` is set then anything installed will use this COMPONENT.
<plugins_dir> <component>)
Install (or copy) an unresolved <plugin> to the default plugins .. command:: install_qt4_plugin
directory (or <plugins_dir>) relative to <executable> and store the
result in <installed_plugin_path_var>. See documentation of
INSTALL_QT4_PLUGIN_PATH.
.. code-block:: cmake .. code-block:: cmake
install_qt4_executable(<executable> install_qt4_plugin(
[<qtplugins> <libs> <dirs> <plugins_dir> <request_qt_conf> <component>]) <plugin>
<executable>
<copy>
<installed_plugin_path_var>
[<plugins_dir> <component>]
)
Installs Qt plugins, writes a Qt configuration file (if needed) and Installs (or copies) an unresolved ``<plugin>`` to the default plugins
fixes up a Qt4 executable using BundleUtilities so it is standalone directory (or ``<plugins_dir>``) relative to ``<executable>`` and stores the
and can be drag-and-drop copied to another machine as long as all of result in a variable ``<installed_plugin_path_var>``. For other arguments,
the system libraries are compatible. The executable will be fixed-up see also :command:`install_qt4_plugin_path`.
at install time. <component> is the COMPONENT used for bundle fixup
and plugin installation. See documentation of FIXUP_QT4_BUNDLE. .. command:: install_qt4_executable
.. code-block:: cmake
install_qt4_executable(
<executable>
[<qtplugins> <libs> <dirs> <plugins_dir> <request_qt_conf> <component>]
)
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. ``<component>`` 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 # The functions defined in this file depend on the fixup_bundle function