summaryrefslogtreecommitdiff
path: root/Modules/FindKDE3.cmake
diff options
context:
space:
mode:
authorAlexander Neundorf <neundorf@kde.org>2008-08-16 19:11:53 -0400
committerAlexander Neundorf <neundorf@kde.org>2008-08-16 19:11:53 -0400
commitdb4bebe5c83dc38551ff4d9507cb20ac4a2f9f56 (patch)
tree6c4dea5577866db0913bb879e5f5cb2724f69d67 /Modules/FindKDE3.cmake
parent814b3687251605ed5c2924b0705ebae2e70d2eb3 (diff)
downloadcmake-db4bebe5c83dc38551ff4d9507cb20ac4a2f9f56.tar.gz
BUG: fix #7447, FindModulesExecuteAll test fails if both Qt3 and KDE4 can be
found in the system Qt3 and Qt4 cannot be used together in one project. Now Qt3/KDE3 and Qt4/KDE4 handle the case that this is done nevertheless properly, i.e. they fail with FATAL_ERROR if it was REQUIRED and they fail with just MESSAGE(STATUS ...) and RETURN() if it was not REQUIRED BUG: make FindQt4 error out with FATAL_ERROR also if it was searched QUIET Alex
Diffstat (limited to 'Modules/FindKDE3.cmake')
-rw-r--r--Modules/FindKDE3.cmake12
1 files changed, 12 insertions, 0 deletions
diff --git a/Modules/FindKDE3.cmake b/Modules/FindKDE3.cmake
index 3281f66dad..0cf8b2404c 100644
--- a/Modules/FindKDE3.cmake
+++ b/Modules/FindKDE3.cmake
@@ -67,6 +67,18 @@ IF(NOT UNIX AND KDE3_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "Compiling KDE3 applications and libraries under Windows is not supported")
ENDIF(NOT UNIX AND KDE3_FIND_REQUIRED)
+# If Qt4 has already been found, fail.
+IF(QT4_FOUND)
+ IF(KDE3_FIND_REQUIRED)
+ MESSAGE( FATAL_ERROR "KDE3/Qt3 and Qt4 cannot be used together in one project.")
+ ELSE(KDE3_FIND_REQUIRED)
+ IF(NOT KDE3_FIND_QUIETLY)
+ MESSAGE( STATUS "KDE3/Qt3 and Qt4 cannot be used together in one project.")
+ ENDIF(NOT KDE3_FIND_QUIETLY)
+ RETURN()
+ ENDIF(KDE3_FIND_REQUIRED)
+ENDIF(QT4_FOUND)
+
SET(QT_MT_REQUIRED TRUE)
#SET(QT_MIN_VERSION "3.0.0")