From 784f530af5f40441569e9fc964dc7da73c1f8a92 Mon Sep 17 00:00:00 2001 From: Alexander Lohnau Date: Tue, 8 Jun 2021 13:02:39 +0200 Subject: [PATCH] KF5PlasmaMacros: Only include ECM manually if config vars are missing --- KF5PlasmaMacros.cmake | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/KF5PlasmaMacros.cmake b/KF5PlasmaMacros.cmake index 953c081fc..ae19a1b14 100644 --- a/KF5PlasmaMacros.cmake +++ b/KF5PlasmaMacros.cmake @@ -1,6 +1,8 @@ - -find_package(ECM 1.6.0 CONFIG REQUIRED) -include(${ECM_KDE_MODULE_DIR}/KDEInstallDirs.cmake) +# To not mess up the ECM_FIND_VERSION we only include ECM if the required variables are not set +if (NOT KDE_INSTALL_KSERVICES5DIR) + find_package(ECM 5.83.0 CONFIG REQUIRED) + include(${ECM_KDE_MODULE_DIR}/KDEInstallDirs.cmake) +endif() set(PLASMA_RELATIVE_DATA_INSTALL_DIR "plasma") set(PLASMA_DATA_INSTALL_DIR "${KDE_INSTALL_DATADIR}/${PLASMA_RELATIVE_DATA_INSTALL_DIR}")