2018-01-26 17:06:56 +01:00
|
|
|
CMAKE_AUTOMOC_MACRO_NAMES
|
|
|
|
----------------------------
|
|
|
|
|
2021-09-14 00:13:48 +02:00
|
|
|
.. versionadded:: 3.10
|
|
|
|
|
2019-11-11 23:01:05 +01:00
|
|
|
:ref:`Semicolon-separated list <CMake Language Lists>` list of macro names used by
|
2018-01-26 17:06:56 +01:00
|
|
|
:variable:`CMAKE_AUTOMOC` to determine if a C++ file needs to be
|
|
|
|
processed by ``moc``.
|
|
|
|
|
|
|
|
This variable is used to initialize the :prop_tgt:`AUTOMOC_MACRO_NAMES`
|
|
|
|
property on all the targets. See that target property for additional
|
|
|
|
information.
|
|
|
|
|
2021-09-14 00:13:48 +02:00
|
|
|
The default value is ``Q_OBJECT;Q_GADGET;Q_NAMESPACE;Q_NAMESPACE_EXPORT``.
|
2018-01-26 17:06:56 +01:00
|
|
|
|
|
|
|
Example
|
2018-04-23 21:13:27 +02:00
|
|
|
^^^^^^^
|
2018-01-26 17:06:56 +01:00
|
|
|
Let CMake know that source files that contain ``CUSTOM_MACRO`` must be ``moc``
|
|
|
|
processed as well::
|
|
|
|
|
|
|
|
set(CMAKE_AUTOMOC ON)
|
|
|
|
list(APPEND CMAKE_AUTOMOC_MACRO_NAMES "CUSTOM_MACRO")
|