From db4bebe5c83dc38551ff4d9507cb20ac4a2f9f56 Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Sat, 16 Aug 2008 19:11:53 -0400 Subject: 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 --- Modules/FindKDE3.cmake | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'Modules/FindKDE3.cmake') 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") -- cgit v1.2.1