summaryrefslogtreecommitdiffstats
path: root/Modules/FindKDE4.cmake
diff options
context:
space:
mode:
authorAlexander Neundorf <neundorf@kde.org>2008-08-16 23:11:53 (GMT)
committerAlexander Neundorf <neundorf@kde.org>2008-08-16 23:11:53 (GMT)
commitdb4bebe5c83dc38551ff4d9507cb20ac4a2f9f56 (patch)
tree6c4dea5577866db0913bb879e5f5cb2724f69d67 /Modules/FindKDE4.cmake
parent814b3687251605ed5c2924b0705ebae2e70d2eb3 (diff)
downloadCMake-db4bebe5c83dc38551ff4d9507cb20ac4a2f9f56.zip
CMake-db4bebe5c83dc38551ff4d9507cb20ac4a2f9f56.tar.gz
CMake-db4bebe5c83dc38551ff4d9507cb20ac4a2f9f56.tar.bz2
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/FindKDE4.cmake')
-rw-r--r--Modules/FindKDE4.cmake12
1 files changed, 12 insertions, 0 deletions
diff --git a/Modules/FindKDE4.cmake b/Modules/FindKDE4.cmake
index 8992468..7eca7c6 100644
--- a/Modules/FindKDE4.cmake
+++ b/Modules/FindKDE4.cmake
@@ -9,6 +9,18 @@
#
# Author: Alexander Neundorf <neundorf@kde.org>
+# If Qt3 has already been found, fail.
+IF(QT_QT_LIBRARY)
+ IF(KDE4_FIND_REQUIRED)
+ MESSAGE( FATAL_ERROR "KDE4/Qt4 and Qt3 cannot be used together in one project.")
+ ELSE(KDE4_FIND_REQUIRED)
+ IF(NOT KDE4_FIND_QUIETLY)
+ MESSAGE( STATUS "KDE4/Qt4 and Qt3 cannot be used together in one project.")
+ ENDIF(NOT KDE_FIND_QUIETLY)
+ RETURN()
+ ENDIF(KDE4_FIND_REQUIRED)
+ENDIF(QT_QTCORE_LIBRARY)
+
FILE(TO_CMAKE_PATH "$ENV{KDEDIRS}" _KDEDIRS)
# when cross compiling, searching kde4-config in order to run it later on