diff options
author | Matthias Kretz <kretz@kde.org> | 2008-07-29 15:14:21 +0000 |
---|---|---|
committer | Matthias Kretz <kretz@kde.org> | 2008-07-29 15:14:21 +0000 |
commit | 76d4c6b036d153e1f3972b8097b93701e976f8f4 (patch) | |
tree | ab81a5972c6a92cf4917c7599692295d261ffed2 | |
parent | 5034e09467548941d9f6eb38d6019f82d0579030 (diff) | |
download | extra-cmake-modules-76d4c6b036d153e1f3972b8097b93701e976f8f4.tar.gz extra-cmake-modules-76d4c6b036d153e1f3972b8097b93701e976f8f4.tar.bz2 |
backport: when using cmake 2.6.0 make sure it's using automoc 0.9.84 or later
svn path=/branches/KDE/4.1/kdelibs/; revision=839227
-rw-r--r-- | modules/FindKDE4Internal.cmake | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/modules/FindKDE4Internal.cmake b/modules/FindKDE4Internal.cmake index d0ed0c46..98b7d4d1 100644 --- a/modules/FindKDE4Internal.cmake +++ b/modules/FindKDE4Internal.cmake @@ -261,6 +261,19 @@ 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) + # use automoc4 from kdesupport set(KDE4_AUTOMOC_EXECUTABLE "${AUTOMOC4_EXECUTABLE}" ) |