CMAKE_AUTOMOC_MACRO_NAMES.rst 619 B

1234567891011121314151617181920
  1. CMAKE_AUTOMOC_MACRO_NAMES
  2. ----------------------------
  3. A :ref:`;-list <CMake Language Lists>` list of macro names used by
  4. :variable:`CMAKE_AUTOMOC` to determine if a C++ file needs to be
  5. processed by ``moc``.
  6. This variable is used to initialize the :prop_tgt:`AUTOMOC_MACRO_NAMES`
  7. property on all the targets. See that target property for additional
  8. information.
  9. The default value is ``Q_OBJECT;Q_GADGET;Q_NAMESPACE``.
  10. Example
  11. ^^^^^^^
  12. Let CMake know that source files that contain ``CUSTOM_MACRO`` must be ``moc``
  13. processed as well::
  14. set(CMAKE_AUTOMOC ON)
  15. list(APPEND CMAKE_AUTOMOC_MACRO_NAMES "CUSTOM_MACRO")