CMAKE_AUTOMOC_MACRO_NAMES

Semicolon-separated list list of macro names used by CMAKE_AUTOMOC to determine if a C++ file needs to be processed by moc .

This variable is used to initialize the AUTOMOC_MACRO_NAMES property on all the targets. See that target property for additional information.

默认值为 Q_OBJECT;Q_GADGET;Q_NAMESPACE .

范例

Let CMake know that source files that contain CUSTOM_MACRO 必须是 moc processed as well:

set(CMAKE_AUTOMOC ON)
list(APPEND CMAKE_AUTOMOC_MACRO_NAMES "CUSTOM_MACRO")
										

内容表

上一话题

CMAKE_AUTOMOC_DEPEND_FILTERS

下一话题

CMAKE_AUTOMOC_MOC_OPTIONS

本页