summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Montel <[email protected]>2018-01-15 08:03:04 +0100
committerLaurent Montel <[email protected]>2018-01-15 08:03:04 +0100
commitc2b8709c75fa64df0cea24c24d5a75dcb67fb13d (patch)
treeff7eea8920ce0af903a43920c9bd6ac3679073fc
parentf57f36f578462e8952aebe973d23a41f9b1ecbcb (diff)
Fix check
-rw-r--r--KF5KontactInterfaceConfig.cmake.in8
1 files changed, 6 insertions, 2 deletions
diff --git a/KF5KontactInterfaceConfig.cmake.in b/KF5KontactInterfaceConfig.cmake.in
index 9b0f7e2..ce909b2 100644
--- a/KF5KontactInterfaceConfig.cmake.in
+++ b/KF5KontactInterfaceConfig.cmake.in
@@ -5,8 +5,12 @@ find_dependency(KF5Parts "@[email protected]")
if(NOT CMAKE_VERSION VERSION_LESS "3.10.0")
# CMake 3.9+ warns about automoc on files without Q_OBJECT, and doesn't know about other macros.
# 3.10+ lets us provide more macro names that require automoc.
- # Remove this when depending on a Frameworks or ECM version that solves this upstream.
- list(APPEND CMAKE_AUTOMOC_MACRO_NAMES "K_PLUGIN_FACTORY_WITH_JSON" "K_PLUGIN_FACTORY" "EXPORT_KONTACT_PLUGIN")
+ # KF5 >= 5.42 takes care itself of adding its macros in its cmake config files
+ if (KF5_VERSION VERSION_LESS "5.42.0")
+ list(APPEND CMAKE_AUTOMOC_MACRO_NAMES "K_PLUGIN_FACTORY_WITH_JSON" "K_PLUGIN_FACTORY" "EXPORT_KONTACT_PLUGIN")
+ else()
+ list(APPEND CMAKE_AUTOMOC_MACRO_NAMES "EXPORT_KONTACT_PLUGIN")
+ endif()
endif()
include("${CMAKE_CURRENT_LIST_DIR}/KF5KontactInterfaceTargets.cmake")