ENH: Better error message for those who switch from Qt3 to Qt4 and don't clean their cache file.
This commit is contained in:
parent
9c2dcf4836
commit
c171d57ed0
|
@ -291,10 +291,10 @@ ENDIF( Qt4_FIND_COMPONENTS )
|
||||||
# If Qt3 has already been found, fail.
|
# If Qt3 has already been found, fail.
|
||||||
IF(QT_QT_LIBRARY)
|
IF(QT_QT_LIBRARY)
|
||||||
IF(Qt4_FIND_REQUIRED)
|
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)
|
ELSE(Qt4_FIND_REQUIRED)
|
||||||
IF(NOT Qt4_FIND_QUIETLY)
|
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)
|
ENDIF(NOT Qt4_FIND_QUIETLY)
|
||||||
RETURN()
|
RETURN()
|
||||||
ENDIF(Qt4_FIND_REQUIRED)
|
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}
|
# 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)
|
IF (QT_USE_FRAMEWORKS)
|
||||||
SET(QT_INCLUDE_DIR ${QT_HEADERS_DIR})
|
SET(QT_INCLUDE_DIR ${QT_HEADERS_DIR})
|
||||||
ELSE (QT_USE_FRAMEWORKS)
|
ELSE (QT_USE_FRAMEWORKS)
|
||||||
STRING( REGEX REPLACE "/QtCore$" "" qt4_include_dir ${QT_QTCORE_INCLUDE_DIR})
|
STRING( REGEX REPLACE "/QtCore$" "" qt4_include_dir ${QT_QTCORE_INCLUDE_DIR})
|
||||||
SET( QT_INCLUDE_DIR ${qt4_include_dir})
|
SET( QT_INCLUDE_DIR ${qt4_include_dir})
|
||||||
ENDIF (QT_USE_FRAMEWORKS)
|
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( NOT QT_INCLUDE_DIR)
|
||||||
IF(Qt4_FIND_REQUIRED)
|
IF(Qt4_FIND_REQUIRED)
|
||||||
|
|
Loading…
Reference in New Issue