diff options
author | Alexander Neundorf <neundorf@kde.org> | 2006-07-02 09:31:31 +0000 |
---|---|---|
committer | Alexander Neundorf <neundorf@kde.org> | 2006-07-02 09:31:31 +0000 |
commit | 399b0cb1979cec7092f65dcbaa4a2e7e4b0a69de (patch) | |
tree | e9465803ca4d353ca620b25f9c1da14248d43e88 | |
parent | 1478579b7e8197f70e4941c8ce4d9660d3e20acd (diff) | |
download | extra-cmake-modules-399b0cb1979cec7092f65dcbaa4a2e7e4b0a69de.tar.gz extra-cmake-modules-399b0cb1979cec7092f65dcbaa4a2e7e4b0a69de.tar.bz2 |
-new option: KDE4_IGNORE_DONTPORT , which if enabled ignores the "don't port against kdelibs HEAD" error
Alex
svn path=/trunk/KDE/kdelibs/; revision=557041
-rw-r--r-- | modules/FindKDE4Internal.cmake | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/modules/FindKDE4Internal.cmake b/modules/FindKDE4Internal.cmake index 53722f39..a148d352 100644 --- a/modules/FindKDE4Internal.cmake +++ b/modules/FindKDE4Internal.cmake @@ -210,7 +210,7 @@ set(APPLNK_INSTALL_DIR /share/applnk CACHE STRING "Is this st option(KDE4_ENABLE_FINAL "Enable final all-in-one compilation") option(KDE4_BUILD_TESTS "Build the tests") option(KDE4_USE_QT_EMB "link to Qt-embedded, don't use X") - +option(KDE4_IGNORE_DONTPORT "ignore the \"don't port\" message from kdelisb (not snapshot)" OFF) #now try to find some kde stuff @@ -256,18 +256,21 @@ else(EXISTS ${CMAKE_SOURCE_DIR}/kdecore/kglobal.h) set( _KDE4_MAKEKDEWIDGETS_DEP) # Check the version of kde. KDE4_KDECONFIG_EXECUTABLE was set by FindKDE4 - EXEC_PROGRAM(${KDE4_KDECONFIG_EXECUTABLE} ARGS "--version" OUTPUT_VARIABLE kdeconfig_output ) - - STRING(REGEX MATCH "KDE: [0-9]+\\.[0-9]+\\.[0-9]+" KDEVERSION "${kdeconfig_output}") - IF (KDEVERSION) - - # avoid porting against kdelibs trunk - string(REGEX MATCH "DONTPORT" _match "${kdeconfig_output}") - if (_match) - message ( FATAL_ERROR "ERROR: don't port against this - version of kdelibs! Use /branches/work/kdelibs4_snapshot - instead!!" ) - endif (_match) + exec_program(${KDE4_KDECONFIG_EXECUTABLE} ARGS "--version" OUTPUT_VARIABLE kdeconfig_output ) + + string(REGEX MATCH "KDE: [0-9]+\\.[0-9]+\\.[0-9]+" KDEVERSION "${kdeconfig_output}") + if (KDEVERSION) + + if (NOT KDE4_IGNORE_DONTPORT) + # avoid porting against kdelibs trunk + string(REGEX MATCH "DONTPORT" _match "${kdeconfig_output}") + if (_match) + message ( FATAL_ERROR "ERROR: don't port against this + version of kdelibs! Use /branches/work/kdelibs4_snapshot instead !" ) + endif (_match) + + endif (NOT KDE4_IGNORE_DONTPORT) + STRING(REGEX REPLACE "^KDE: " "" KDEVERSION "${KDEVERSION}") |