cmake/Help/variable/CMAKE_AUTOMOC_MACRO_NAMES.rst

21 lines
619 B
ReStructuredText
Raw Normal View History

2018-01-26 17:06:56 +01:00
CMAKE_AUTOMOC_MACRO_NAMES
----------------------------
A :ref:`;-list <CMake Language Lists>` list of macro names used by
: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.
The default value is ``Q_OBJECT;Q_GADGET;Q_NAMESPACE``.
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")