ENH: Better error message for those who switch from Qt3 to Qt4 and don't clean their cache file.

This commit is contained in:
Clinton Stimpson 2009-05-19 11:38:18 -04:00
parent 9c2dcf4836
commit c171d57ed0
1 changed files with 4 additions and 4 deletions

View File

@ -291,10 +291,10 @@ ENDIF( Qt4_FIND_COMPONENTS )
# 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.")
MESSAGE( FATAL_ERROR "Qt3 and Qt4 cannot be used together in one project. If switching to Qt4, the CMakeCache.txt needs to be cleaned.")
ELSE(Qt4_FIND_REQUIRED)
IF(NOT Qt4_FIND_QUIETLY)
MESSAGE( STATUS "Qt3 and Qt4 cannot be used together in one project.")
MESSAGE( STATUS "Qt3 and Qt4 cannot be used together in one project. If switching to Qt4, the CMakeCache.txt needs to be cleaned.")
ENDIF(NOT Qt4_FIND_QUIETLY)
RETURN()
ENDIF(Qt4_FIND_REQUIRED)
@ -630,14 +630,14 @@ IF (QT4_QMAKE_FOUND)
)
# Set QT_INCLUDE_DIR by removine "/QtCore" in the string ${QT_QTCORE_INCLUDE_DIR}
IF( QT_QTCORE_INCLUDE_DIR AND NOT QT_INCLUDE_DIR)
IF( QT_QTCORE_INCLUDE_DIR )
IF (QT_USE_FRAMEWORKS)
SET(QT_INCLUDE_DIR ${QT_HEADERS_DIR})
ELSE (QT_USE_FRAMEWORKS)
STRING( REGEX REPLACE "/QtCore$" "" qt4_include_dir ${QT_QTCORE_INCLUDE_DIR})
SET( QT_INCLUDE_DIR ${qt4_include_dir})
ENDIF (QT_USE_FRAMEWORKS)
ENDIF( QT_QTCORE_INCLUDE_DIR AND NOT QT_INCLUDE_DIR)
ENDIF( QT_QTCORE_INCLUDE_DIR )
IF( NOT QT_INCLUDE_DIR)
IF(Qt4_FIND_REQUIRED)