summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Montel <[email protected]>2018-01-15 07:59:42 +0100
committerLaurent Montel <[email protected]>2018-01-15 07:59:48 +0100
commit48f6d9eddf8c475a24eddbab406f999f9a8177c3 (patch)
tree8c031bb0cb95398e2c1a923261da2c16ff06b177
parent4e1abb285277b0d65043e25e42ceddee8c18dd1a (diff)
Fix check
-rw-r--r--CMakeLists.txt14
1 files changed, 8 insertions, 6 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c4ee12e..7f094b6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -19,12 +19,6 @@ set(KDEPIM_DEV_VERSION alpha)
if(DEFINED KDEPIM_DEV_VERSION)
set(KDEPIM_DEV_VERSION " ${KDEPIM_DEV_VERSION}")
endif()
-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")
-endif()
set(KDEPIMADDONS_VERSION_NUMBER ${PIM_VERSION})
set(KDEPIMADDONS_VERSION "${KDEPIMADDONS_VERSION_NUMBER}${KDEPIM_DEV_VERSION}")
@@ -146,6 +140,14 @@ find_package(SharedMimeInfo ${SharedMimeInfo_MINIMUM_VERSION} REQUIRED)
find_package(Poppler COMPONENTS Qt5)
set_package_properties("Poppler" PROPERTIES TYPE OPTIONAL PURPOSE "Support for PDF booking confirmations in the semantic extraction plugin.")
+if(NOT CMAKE_VERSION VERSION_LESS "3.10.0" AND KF5_VERSION VERSION_LESS "5.42.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.
+ # KF5 >= 5.42 takes care itself of adding its macros in its cmake config files
+ list(APPEND CMAKE_AUTOMOC_MACRO_NAMES "K_PLUGIN_FACTORY_WITH_JSON" "K_PLUGIN_FACTORY")
+endif()
+
+
if (KDEPIMADDONS_BUILD_EXAMPLES)
add_subdirectory(examples)
endif()