KF5PlasmaMacros: Only include ECM manually if config vars are missing

This commit is contained in:
Alexander Lohnau 2021-06-08 13:02:39 +02:00
parent b2f821ad21
commit 784f530af5
1 changed files with 5 additions and 3 deletions

View File

@ -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}")