[Cmake-commits] [cmake-commits] alex committed FindQt3.cmake 1.19 1.20 FindQt4.cmake 1.124 1.125 FindKDE3.cmake 1.20 1.21 FindKDE4.cmake 1.13 1.14
cmake-commits at cmake.org
cmake-commits at cmake.org
Sat Aug 16 19:11:55 EDT 2008
Update of /cvsroot/CMake/CMake/Modules
In directory public:/mounts/ram/cvs-serv25002
Modified Files:
FindQt3.cmake FindQt4.cmake FindKDE3.cmake FindKDE4.cmake
Log Message:
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
Index: FindKDE4.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/FindKDE4.cmake,v
retrieving revision 1.13
retrieving revision 1.14
diff -C 2 -d -r1.13 -r1.14
*** FindKDE4.cmake 26 Jun 2008 17:14:28 -0000 1.13
--- FindKDE4.cmake 16 Aug 2008 23:11:53 -0000 1.14
***************
*** 10,13 ****
--- 10,25 ----
# Author: Alexander Neundorf <neundorf at 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)
Index: FindQt3.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/FindQt3.cmake,v
retrieving revision 1.19
retrieving revision 1.20
diff -C 2 -d -r1.19 -r1.20
*** FindQt3.cmake 16 Aug 2008 21:14:01 -0000 1.19
--- FindQt3.cmake 16 Aug 2008 23:11:53 -0000 1.20
***************
*** 21,24 ****
--- 21,37 ----
# QT_WRAP_UI set true if QT_UIC_EXECUTABLE is found
+ # If Qt4 has already been found, fail.
+ IF(QT4_FOUND)
+ IF(Qt3_FIND_REQUIRED)
+ MESSAGE( FATAL_ERROR "Qt3 and Qt4 cannot be used together in one project.")
+ ELSE(Qt3_FIND_REQUIRED)
+ IF(NOT Qt3_FIND_QUIETLY)
+ MESSAGE( STATUS "Qt3 and Qt4 cannot be used together in one project.")
+ ENDIF(NOT Qt3_FIND_QUIETLY)
+ RETURN()
+ ENDIF(Qt3_FIND_REQUIRED)
+ ENDIF(QT4_FOUND)
+
+
FILE(GLOB GLOB_PATHS_BIN /usr/lib/qt-3*/bin/)
FIND_PATH(QT_INCLUDE_DIR qt.h
***************
*** 40,44 ****
# QT_INCLUDE_DIR to NOTFOUND
IF(NOT EXISTS ${QT_INCLUDE_DIR}/qglobal.h)
! SET(QT_INCLUDE_DIR QT_INCLUDE_DIR-NOTFOUND CACHE PATH "path to qt3 include directory" FORCE)
ENDIF(NOT EXISTS ${QT_INCLUDE_DIR}/qglobal.h)
--- 53,57 ----
# QT_INCLUDE_DIR to NOTFOUND
IF(NOT EXISTS ${QT_INCLUDE_DIR}/qglobal.h)
! SET(QT_INCLUDE_DIR QT_INCLUDE_DIR-NOTFOUND CACHE PATH "path to Qt3 include directory" FORCE)
ENDIF(NOT EXISTS ${QT_INCLUDE_DIR}/qglobal.h)
***************
*** 52,56 ****
# version X.Y.Z, so we need to remove the dots from version
STRING(REGEX REPLACE "\\." "" qt_version_str_lib "${qt_version_str}")
- ELSE(QT_INCLUDE_DIR)
ENDIF(QT_INCLUDE_DIR)
--- 65,68 ----
Index: FindQt4.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/FindQt4.cmake,v
retrieving revision 1.124
retrieving revision 1.125
diff -C 2 -d -r1.124 -r1.125
*** FindQt4.cmake 5 Jul 2008 15:57:57 -0000 1.124
--- FindQt4.cmake 16 Aug 2008 23:11:53 -0000 1.125
***************
*** 257,260 ****
--- 257,273 ----
# QT_QT_LIBRARY Qt-Library is now split
+ # If Qt3 has already been found, fail.
+ IF(QT_QT_LIBRARY)
+ IF(Qt4_FIND_REQUIRED)
+ MESSAGE( FATAL_ERROR "Qt3 and Qt4 cannot be used together in one project.")
+ ELSE(Qt4_FIND_REQUIRED)
+ IF(NOT Qt4_FIND_QUIETLY)
+ MESSAGE( STATUS "Qt3 and Qt4 cannot be used together in one project.")
+ ENDIF(NOT Qt4_FIND_QUIETLY)
+ RETURN()
+ ENDIF(Qt4_FIND_REQUIRED)
+ ENDIF(QT_QTCORE_LIBRARY)
+
+
INCLUDE(CheckSymbolExists)
INCLUDE(MacroAddFileDependencies)
***************
*** 475,481 ****
IF( NOT QT_INCLUDE_DIR)
! IF( NOT Qt4_FIND_QUIETLY AND Qt4_FIND_REQUIRED)
MESSAGE( FATAL_ERROR "Could NOT find QtGlobal header")
! ENDIF( NOT Qt4_FIND_QUIETLY AND Qt4_FIND_REQUIRED)
ENDIF( NOT QT_INCLUDE_DIR)
--- 488,494 ----
IF( NOT QT_INCLUDE_DIR)
! IF(Qt4_FIND_REQUIRED)
MESSAGE( FATAL_ERROR "Could NOT find QtGlobal header")
! ENDIF(Qt4_FIND_REQUIRED)
ENDIF( NOT QT_INCLUDE_DIR)
***************
*** 772,778 ****
ENDIF(QT_LIBRARY_DIR AND MSVC)
! IF( NOT Qt4_FIND_QUIETLY AND Qt4_FIND_REQUIRED)
MESSAGE( FATAL_ERROR "Could NOT find QtCore. Check ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log for more details.")
! ENDIF( NOT Qt4_FIND_QUIETLY AND Qt4_FIND_REQUIRED)
ENDIF( NOT QT_QTCORE_LIBRARY_DEBUG AND NOT QT_QTCORE_LIBRARY_RELEASE )
--- 785,791 ----
ENDIF(QT_LIBRARY_DIR AND MSVC)
! IF(Qt4_FIND_REQUIRED)
MESSAGE( FATAL_ERROR "Could NOT find QtCore. Check ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log for more details.")
! ENDIF(Qt4_FIND_REQUIRED)
ENDIF( NOT QT_QTCORE_LIBRARY_DEBUG AND NOT QT_QTCORE_LIBRARY_RELEASE )
Index: FindKDE3.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/FindKDE3.cmake,v
retrieving revision 1.20
retrieving revision 1.21
diff -C 2 -d -r1.20 -r1.21
*** FindKDE3.cmake 5 Aug 2008 20:06:14 -0000 1.20
--- FindKDE3.cmake 16 Aug 2008 23:11:53 -0000 1.21
***************
*** 68,71 ****
--- 68,83 ----
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)
More information about the Cmake-commits
mailing list