From 0a2a078fd1820f87c6828bfc69cffc91f08e44c3 Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Sun, 7 Sep 2008 21:32:44 +0000 Subject: -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 --- modules/FindKDE4Internal.cmake | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'modules') 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 -- cgit v1.2.1