aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Kretz <kretz@kde.org>2008-08-06 15:10:23 +0000
committerMatthias Kretz <kretz@kde.org>2008-08-06 15:10:23 +0000
commita5ee1f9b369e753b88143329a289e437f0a7f272 (patch)
tree678ed331c49f1533220b81dd1eeaef7740365758
parent0240a0e5dd4e6e546a8df6e8453d80d4686dca79 (diff)
downloadextra-cmake-modules-a5ee1f9b369e753b88143329a289e437f0a7f272.tar.gz
extra-cmake-modules-a5ee1f9b369e753b88143329a289e437f0a7f272.tar.bz2
one check less, now that cmake 2.6.0 is required
svn path=/trunk/KDE/kdelibs/; revision=843151
-rw-r--r--modules/FindKDE4Internal.cmake20
1 files changed, 9 insertions, 11 deletions
diff --git a/modules/FindKDE4Internal.cmake b/modules/FindKDE4Internal.cmake
index 4ea3d2e3..3ab33147 100644
--- a/modules/FindKDE4Internal.cmake
+++ b/modules/FindKDE4Internal.cmake
@@ -259,17 +259,15 @@ find_package(Qt4 REQUIRED)
# automoc4 (from kdesupport) is now required, Alex
find_package(Automoc4 REQUIRED)
-if (CMAKE_MAJOR_VERSION GREATER 4)
- # cmake 2.6.0 and automoc4 0.9.83 didn't add the necessary definitions for backends to moc calls
- if (NOT AUTOMOC4_VERSION)
- # the version macro was added for 0.9.84
- set(AUTOMOC4_VERSION "0.9.83")
- endif (NOT AUTOMOC4_VERSION)
- macro_ensure_version("0.9.84" "${AUTOMOC4_VERSION}" _automoc4_version_ok)
- if (NOT _automoc4_version_ok)
- message(FATAL_ERROR "Your version of automoc4 is too old. You have ${AUTOMOC4_VERSION}, you need at least 0.9.84")
- endif (NOT _automoc4_version_ok)
-endif (CMAKE_MAJOR_VERSION GREATER 4)
+# cmake 2.6.0 and automoc4 < 0.9.84 don't work right for -D flags
+if (NOT AUTOMOC4_VERSION)
+ # the version macro was added for 0.9.84
+ set(AUTOMOC4_VERSION "0.9.83")
+endif (NOT AUTOMOC4_VERSION)
+macro_ensure_version("0.9.84" "${AUTOMOC4_VERSION}" _automoc4_version_ok)
+if (NOT _automoc4_version_ok)
+ message(FATAL_ERROR "Your version of automoc4 is too old. You have ${AUTOMOC4_VERSION}, you need at least 0.9.84")
+endif (NOT _automoc4_version_ok)
# use automoc4 from kdesupport
set(KDE4_AUTOMOC_EXECUTABLE "${AUTOMOC4_EXECUTABLE}" )