diff options
author | Alexander Neundorf <neundorf@kde.org> | 2008-09-07 21:32:44 +0000 |
---|---|---|
committer | Alexander Neundorf <neundorf@kde.org> | 2008-09-07 21:32:44 +0000 |
commit | 0a2a078fd1820f87c6828bfc69cffc91f08e44c3 (patch) | |
tree | 1c1973f465235db8dbf8d0e3affddaf5b8ec8f4d | |
parent | 818a5c7d4e7b75cd4832a2bc6913d012569a52a8 (diff) | |
download | extra-cmake-modules-0a2a078fd1820f87c6828bfc69cffc91f08e44c3.tar.gz extra-cmake-modules-0a2a078fd1820f87c6828bfc69cffc91f08e44c3.tar.bz2 |
-fix handling of "REQUIRED" when used in kdelibs
(otherwise if automoc was too old you got "unknown cmake command kde4_add_executable()", where the cause is not too obvious)
Alex
svn path=/trunk/KDE/kdelibs/; revision=858363
-rw-r--r-- | modules/FindKDE4Internal.cmake | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/modules/FindKDE4Internal.cmake b/modules/FindKDE4Internal.cmake index 36154b60..e7be00bf 100644 --- a/modules/FindKDE4Internal.cmake +++ b/modules/FindKDE4Internal.cmake @@ -262,14 +262,17 @@ if(NOT KDE4_FOUND) include (MacroEnsureVersion) -# we may only search for other packages with "REQUIRED" if we are required ourselves -if(KDE4_FIND_REQUIRED) +# We may only search for other packages with "REQUIRED" if we are required ourselves. +# This file can be processed either (usually) included in FindKDE4.cmake or +# (when building kdelibs) directly via FIND_PACKAGE(KDE4Internal), that's why +# we have to check for both KDE4_FIND_REQUIRED and KDE4Internal_FIND_REQUIRED. +if(KDE4_FIND_REQUIRED OR KDE4Internal_FIND_REQUIRED) set(_REQ_STRING_KDE4 "REQUIRED") set(_REQ_STRING_KDE4_MESSAGE "FATAL_ERROR") -else(KDE4_FIND_REQUIRED) +else(KDE4_FIND_REQUIRED OR KDE4Internal_FIND_REQUIRED) set(_REQ_STRING_KDE4 ) set(_REQ_STRING_KDE4_MESSAGE "STATUS") -endif(KDE4_FIND_REQUIRED) +endif(KDE4_FIND_REQUIRED OR KDE4Internal_FIND_REQUIRED) set(QT_MIN_VERSION "4.4.0") #this line includes FindQt4.cmake, which searches the Qt library and headers |