Przeglądaj źródła

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

Clinton Stimpson 16 lat temu
rodzic
commit
c171d57ed0
1 zmienionych plików z 4 dodań i 4 usunięć
  1. 4 4
      Modules/FindQt4.cmake

+ 4 - 4
Modules/FindQt4.cmake

@@ -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)