summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKai Koehne <kai.koehne@qt.io>2019-06-20 16:43:00 +0200
committerKai Koehne <kai.koehne@qt.io>2019-07-30 13:45:49 +0200
commit8c6b31353174e5f95cbc43c0ab51c8b0085b2663 (patch)
tree971e7be2faab9458eeda50363e6ff21b092377cb
parent4ef5512d625f2ee5198f08645482bd42d90e47f2 (diff)
Update CMake Macro reference
Use the individual command documentation that have been created inside the modules. Also rename it to 'Command Reference', because most commands are actually implemented as functions, not macros. Change-Id: I96609e9f7411de72c0353d2cf28ab8d0a0d250f7 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
-rw-r--r--doc/src/development/cmake-manual.qdoc130
1 files changed, 15 insertions, 115 deletions
diff --git a/doc/src/development/cmake-manual.qdoc b/doc/src/development/cmake-manual.qdoc
index 6075c31cc..0687eaead 100644
--- a/doc/src/development/cmake-manual.qdoc
+++ b/doc/src/development/cmake-manual.qdoc
@@ -132,121 +132,21 @@
\li QT_LIBINFIX String containing the infix used in library names.
\endlist
- \section1 Macro Reference
-
- \section2 Qt5Core macros
-
- Macros available when Qt5Core is found.
-
- \table
- \header \li Macro \li Description
- \row \li qt5_wrap_cpp(outfiles inputfile ... OPTIONS ...)
- \li Create moc code from a list of files containing Qt class with
- the Q_OBJECT declaration. Per-directory preprocessor definitions
- are also added. Options may be given to moc, such as those found
- when executing "moc -help".
- \row \li qt5_add_resources(outfiles inputfile ... OPTIONS ...)
- \li Create code from a list of Qt resource files.
- Options may be given to rcc, such as those found
- when executing "rcc -help".
- \row \li qt5_add_binary_resources(target inputfile ... OPTIONS ... DESTINATION ...)
- \li Create an RCC file from a list of Qt resource files.
- Options may be given to rcc, such as those found
- when executing "rcc -help".
- A destination may be given to use a different filename
- or path for the RCC file.
- \row \li qt5_generate_moc(inputfile outputfile )
- \li Creates a rule to run moc on infile and create outfile.
- Use this if for some reason QT5_WRAP_CPP() isn't appropriate, e.g.
- because you need a custom filename for the moc file or something similar.
- \row \li qt5_use_modules(target [LINK_PUBLIC|LINK_PRIVATE] module ... )
- \li Indicates that the target uses the named Qt 5 modules. The target
- will be linked to the specified modules, use the include directories
- installed by those modules, use the COMPILE_DEFINITIONS set by those
- modules, and use the COMPILE_FLAGS set by the modules. The LINK_PRIVATE
- or LINK_PUBLIC specifiers can optionally be specified. If LINK_PRIVATE is specified
- then the modules are not made part of the link interface of the target.
- See the documentation for
- \l{CMake target_link_libraries Documentation}{target_link_libraries}
- for more information.
-
- Note that this macro is only available if using \c{CMake} 2.8.9 or later.
- This macro is obsolete. Use target_link_libraries with IMPORTED targets instead.
- \endtable
-
- \section2 Qt5Widgets macros
-
- Macros available when Qt5Widgets is found.
-
- \table
- \header \li Macro \li Description
- \row \li qt5_wrap_ui(outfiles inputfile ... OPTIONS ...)
- \li Create code from a list of Qt designer ui files.
- Options may be given to uic, such as those found
- when executing "uic -help"
- \endtable
-
- \section2 Qt5DBus macros
-
- Macros available when Qt5DBus is found.
-
- \table
- \header \li Macro \li Description
- \row \li qt5_add_dbus_interface(outfiles interface basename)
- \li Create the interface header and implementation files with the
- given basename from the given interface xml file and add it to
- the list of sources
-
- \row \li qt5_add_dbus_interfaces(outfiles inputfile ... )
- \li Create the interface header and implementation files
- for all listed interface xml files
- the name will be automatically determined from the name of the xml file
-
- \row \li qt5_add_dbus_adaptor(outfiles xmlfile parentheader parentclassname [basename] [classname])
- \li Create a dbus adaptor (header and implementation file) from the xml file
- describing the interface, and add it to the list of sources. The adaptor
- forwards the calls to a parent class, defined in parentheader and named
- parentclassname. The name of the generated files will be
- <basename>adaptor.{cpp,h} where basename defaults to the basename of the xml file.
- If <classname> is provided, then it will be used as the classname of the
- adaptor itself.
-
- \row \li qt5_generate_dbus_interface( header [interfacename] OPTIONS ...)
- \li Generate the xml interface file from the given header.
- If the optional argument interfacename is omitted, the name of the
- interface file is constructed from the basename of the header with
- the suffix .xml appended.
- Options may be given to qdbuscpp2xml, such as those found when executing "qdbuscpp2xml --help"
- \endtable
-
- \section2 Qt5LinguistTools macros
-
- Macros available when Qt5LinguistTools is found.
-
- \table
- \header \li Macro \li Description
- \row \li qt5_create_translation( qm_files directories ... sources ...
- ts_files ... OPTIONS ...)
- \li Out: qm_files
- In: Directories sources ts_files
- Options: flags to pass to lupdate, such as -extensions to specify
- Extensions for a directory scan.
- Generates commands to create .ts (via lupdate) and .qm
- (via lrelease) - files from directories and/or sources. The ts files are
- created and/or updated in the source tree (unless given with full paths).
- The qm files are generated in the build tree.
- Updating the translations can be done by adding the qm_files
- to the source list of your library/executable, so they are
- always updated, or by adding a custom target to control when
- they get updated/generated.
-
- \row \li qt5_add_translation( qm_files ts_files ... )
- \li Out: qm_files
- In: ts_files
- Generates commands to create .qm from .ts - files. The generated
- filenames can be found in qm_files. The ts_files
- must exist and are not updated in any way.
- \endtable
+ \section1 Command Reference
+ \section2 Qt5::Core
+ \annotatedlist cmake-macros-qtcore
+
+ \section2 Qt5::Widgets
+
+ \annotatedlist cmake-macros-qtwidgets
+
+ \section2 Qt5::DBus
+
+ \annotatedlist cmake-commands-qtdbus
+
+ \section2 Qt5::LinguistTools
+
+ \annotatedlist cmake-macros-qtlinguisttools
*/