Git commit 3f1d76e7b9382baf4ccc3f8460b674a451abadca by Alex Neundorf.
Committed on 09/02/2013 at 10:58.
Pushed by neundorf into branch 'frameworks'.

- tier2 buildsystem improvements

Add checks in the install Config.cmake files that the needed packages/imported 
targets (kcoreaddons
both for kauth and kconfig) are present, so we fail at cmake time if not.
This is not done for kdeqt5staging since this is temporary, so we have to live 
with this for some time.

Not quite sure about the other imported targets. For the imported targets for 
Qt it could be done too.
But what about others ? They may depend on cmake-time switches, so we can't 
simply hardcode them in
the Config.cmake.in file. Ok, we can configure a list of required targets to 
it...

Alex

CCMAIL: kde-buildsys...@kde.org, kde-frameworks-devel@kde.org

M  +6    -0    tier2/kauth/kauthConfig.cmake.in
M  +6    -0    tier2/kconfig/kconfigConfig.cmake.in

http://commits.kde.org/kdelibs/3f1d76e7b9382baf4ccc3f8460b674a451abadca

diff --git a/tier2/kauth/kauthConfig.cmake.in b/tier2/kauth/kauthConfig.cmake.in
index bdb608c..ffe7a16 100644
--- a/tier2/kauth/kauthConfig.cmake.in
+++ b/tier2/kauth/kauthConfig.cmake.in
@@ -2,6 +2,12 @@
 
 # Any changes in this ".cmake" file will be overwritten by CMake, the source 
is the ".cmake.in" file.
 
+if(NOT TARGET KF5::kcoreaddons)
+   set(kconfig_NOT_FOUND_MESSAGE "kauth depends on the package kcoreaddons, 
which is missing. Use find_package() to find it before kauth.")
+   set(kconfig_FOUND FALSE)
+   return()
+endif()
+
 set(kauth_VERSION_MAJOR "@KAUTH_VERSION_MAJOR@")
 set(kauth_VERSION_MINOR "@KAUTH_VERSION_MINOR@")
 set(kauth_VERSION_PATCH "@KAUTH_VERSION_PATCH@")
diff --git a/tier2/kconfig/kconfigConfig.cmake.in 
b/tier2/kconfig/kconfigConfig.cmake.in
index 8dc4cab..5f6316f 100644
--- a/tier2/kconfig/kconfigConfig.cmake.in
+++ b/tier2/kconfig/kconfigConfig.cmake.in
@@ -2,6 +2,12 @@
 
 # Any changes in this ".cmake" file will be overwritten by CMake, the source 
is the ".cmake.in" file.
 
+if(NOT TARGET KF5::kcoreaddons)
+   set(kconfig_NOT_FOUND_MESSAGE "kconfig depends on the package kcoreaddons, 
which is missing. Use find_package() to find it before kconfig.")
+   set(kconfig_FOUND FALSE)
+   return()
+endif()
+
 set(kconfig_VERSION_MAJOR "@KCONFIG_VERSION_MAJOR@")
 set(kconfig_VERSION_MINOR "@KCONFIG_VERSION_MINOR@")
 set(kconfig_VERSION_PATCH "@KCONFIG_VERSION_PATCH@")

_______________________________________________
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel

Reply via email to