From 9c79a961df1f7aeafe73e21f1a5520a6e1cb8bce Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Tue, 11 Jul 2017 08:28:15 -0400 Subject: [PATCH] Partitions: split KPMCore-finding code into an include-module --- CMakeModules/IncludeKPMCore.cmake | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 CMakeModules/IncludeKPMCore.cmake diff --git a/CMakeModules/IncludeKPMCore.cmake b/CMakeModules/IncludeKPMCore.cmake new file mode 100644 index 000000000..b06299d91 --- /dev/null +++ b/CMakeModules/IncludeKPMCore.cmake @@ -0,0 +1,17 @@ +# Shared CMake core for finding KPMCore +# +# This is wrapped into a CMake include file because there's a bunch of +# pre-requisites that need searching for before looking for KPMCore. +# If you just do find_package( KPMCore ) without finding the things +# it links against first, you get CMake errors. +# +# +find_package(ECM 5.10.0 REQUIRED NO_MODULE) +set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${CMAKE_MODULE_PATH}) + +include(KDEInstallDirs) +include(GenerateExportHeader) +find_package( KF5 REQUIRED CoreAddons ) +find_package( KF5 REQUIRED Config I18n IconThemes KIO Service ) + +find_package( KPMcore 3.0.3 REQUIRED )