Commit 5b42875a authored by Thomas Eschenbacher's avatar Thomas Eschenbacher
Browse files

fix for annoying and false AutoMoc warning

the line with:
LIST(APPEND CMAKE_AUTOMOC_MACRO_NAMES "KWAVE_PLUGIN")

now has to be set *after* FIND_PACKAGE(Qt5 Core ...), otherwise the list would be overwritten and produce many annoying build warnings like these:

AutoMoc warning
---------------
"SRC:/plugins/<plugin>/<file>.cpp"
includes the moc file "<file>.moc", but does not contain a Q_OBJECT, Q_GADGET, Q_NAMESPACE, Q_NAMESPACE_EXPORT, K_PLUGIN_FACTORY, K_PLUGIN_FACTORY_WITH_JSON, K_PLUGIN_CLASS_WITH_JSON, K_PLUGIN_FACTORY, K_PLUGIN_FACTORY_WITH_JSON, K_PLUGIN_CLASS_WITH_JSON, K_PLUGIN_FACTORY, K_PLUGIN_FACTORY_WITH_JSON, K_PLUGIN_CLASS_WITH_JSON, K_PLUGIN_FACTORY, K_PLUGIN_FACTORY_WITH_JSON, K_PLUGIN_CLASS_WITH_JSON, K_PLUGIN_FACTORY, K_PLUGIN_FACTORY_WITH_JSON, K_PLUGIN_CLASS_WITH_JSON, K_PLUGIN_FACTORY, K_PLUGIN_FACTORY_WITH_JSON, K_PLUGIN_CLASS_WITH_JSON, K_PLUGIN_FACTORY, K_PLUGIN_FACTORY_WITH_JSON, K_PLUGIN_CLASS_WITH_JSON, K_PLUGIN_FACTORY, K_PLUGIN_FACTORY_WITH_JSON or K_PLUGIN_CLASS_WITH_JSON macro.
parent ff415a33
......@@ -201,7 +201,6 @@ LINK_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}/libkwave)
SET(CMAKE_AUTOMOC TRUE)
SET(CMAKE_AUTOMOC_RELAXED_MODE FALSE)
LIST(APPEND CMAKE_AUTOMOC_MACRO_NAMES "KWAVE_PLUGIN")
FIND_PACKAGE(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS
Concurrent
......@@ -209,6 +208,10 @@ FIND_PACKAGE(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS
Widgets
)
# NOTE: this must be *after* FIND_PACKAGE(Qt5 Core ...), otherwise it would
# be overwritten and produce many annoying build warnings
LIST(APPEND CMAKE_AUTOMOC_MACRO_NAMES "KWAVE_PLUGIN")
# Qt Multimedia support
OPTION(WITH_QT_AUDIO "enable playback via Qt Multimedia [default=on]" ON)
IF (WITH_QT_AUDIO)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment