From cd3d63f43d92dc3db4ae7c850f64db6a11af4e6e Mon Sep 17 00:00:00 2001 From: "Friedrich W. H. Kossebau" Date: Sat, 3 Feb 2018 19:08:09 +0100 Subject: [PATCH] Prevent cmake 3.10+ warning with automoc & K_EXPORT_PLASMA_GEOLOCATIONPROVIDER --- dataengines/geolocation/CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dataengines/geolocation/CMakeLists.txt b/dataengines/geolocation/CMakeLists.txt index 261da06c5..c36f2ccb1 100644 --- a/dataengines/geolocation/CMakeLists.txt +++ b/dataengines/geolocation/CMakeLists.txt @@ -1,3 +1,9 @@ +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. + list(APPEND CMAKE_AUTOMOC_MACRO_NAMES K_EXPORT_PLASMA_GEOLOCATIONPROVIDER) +endif() + set(plasma_geolocation_interface_SRCS geolocationprovider.cpp) add_library(plasma-geolocation-interface SHARED ${plasma_geolocation_interface_SRCS}) target_link_libraries(plasma-geolocation-interface