diff options
author | Clinton Stimpson <clinton@elemtech.com> | 2008-03-05 17:53:44 (GMT) |
---|---|---|
committer | Clinton Stimpson <clinton@elemtech.com> | 2008-03-05 17:53:44 (GMT) |
commit | c39a8c39aa1ce3871b1b96feb9842268f2ee1b22 (patch) | |
tree | 8b7491c8e698389e211fbbf85e223c7cf549410d /Modules/FindQt4.cmake | |
parent | f2c6e9e4809c9a85293bd9d01183c99c4598c403 (diff) | |
download | CMake-c39a8c39aa1ce3871b1b96feb9842268f2ee1b22.zip CMake-c39a8c39aa1ce3871b1b96feb9842268f2ee1b22.tar.gz CMake-c39a8c39aa1ce3871b1b96feb9842268f2ee1b22.tar.bz2 |
ENH: Allow users to recover from trying to use an improperly installed Qt
without removing their cache, fixing their environment and trying again.
Diffstat (limited to 'Modules/FindQt4.cmake')
-rw-r--r-- | Modules/FindQt4.cmake | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/Modules/FindQt4.cmake b/Modules/FindQt4.cmake index c49e2c5..64bf8f8 100644 --- a/Modules/FindQt4.cmake +++ b/Modules/FindQt4.cmake @@ -383,32 +383,32 @@ IF (QT4_QMAKE_FOUND) ENDIF (APPLE) # ask qmake for the binary dir - IF (NOT QT_BINARY_DIR) + IF (QT_LIBRARY_DIR AND NOT QT_BINARY_DIR) EXEC_PROGRAM(${QT_QMAKE_EXECUTABLE} ARGS "-query QT_INSTALL_BINS" OUTPUT_VARIABLE qt_bins ) SET(QT_BINARY_DIR ${qt_bins} CACHE INTERNAL "") - ENDIF (NOT QT_BINARY_DIR) + ENDIF (QT_LIBRARY_DIR AND NOT QT_BINARY_DIR) # ask qmake for the include dir - IF (NOT QT_HEADERS_DIR) + IF (QT_LIBRARY_DIR AND NOT QT_HEADERS_DIR) EXEC_PROGRAM( ${QT_QMAKE_EXECUTABLE} ARGS "-query QT_INSTALL_HEADERS" OUTPUT_VARIABLE qt_headers ) SET(QT_HEADERS_DIR ${qt_headers} CACHE INTERNAL "") - ENDIF(NOT QT_HEADERS_DIR) + ENDIF(QT_LIBRARY_DIR AND NOT QT_HEADERS_DIR) # ask qmake for the documentation directory - IF (NOT QT_DOC_DIR) + IF (QT_LIBRARY_DIR AND NOT QT_DOC_DIR) EXEC_PROGRAM( ${QT_QMAKE_EXECUTABLE} ARGS "-query QT_INSTALL_DOCS" OUTPUT_VARIABLE qt_doc_dir ) SET(QT_DOC_DIR ${qt_doc_dir} CACHE PATH "The location of the Qt docs") - ENDIF (NOT QT_DOC_DIR) + ENDIF (QT_LIBRARY_DIR AND NOT QT_DOC_DIR) # ask qmake for the mkspecs directory - IF (NOT QT_MKSPECS_DIR) + IF (QT_LIBRARY_DIR AND NOT QT_MKSPECS_DIR) EXEC_PROGRAM( ${QT_QMAKE_EXECUTABLE} ARGS "-query QMAKE_MKSPECS" OUTPUT_VARIABLE qt_mkspecs_dirs ) @@ -416,15 +416,15 @@ IF (QT4_QMAKE_FOUND) FIND_PATH(QT_MKSPECS_DIR qconfig.pri PATHS ${qt_mkspecs_dirs} DOC "The location of the Qt mkspecs containing qconfig.pri" NO_DEFAULT_PATH ) - ENDIF (NOT QT_MKSPECS_DIR) + ENDIF (QT_LIBRARY_DIR AND NOT QT_MKSPECS_DIR) # ask qmake for the plugins directory - IF (NOT QT_PLUGINS_DIR) + IF (QT_LIBRARY_DIR AND NOT QT_PLUGINS_DIR) EXEC_PROGRAM( ${QT_QMAKE_EXECUTABLE} ARGS "-query QT_INSTALL_PLUGINS" OUTPUT_VARIABLE qt_plugins_dir ) SET(QT_PLUGINS_DIR ${qt_plugins_dir} CACHE PATH "The location of the Qt plugins") - ENDIF (NOT QT_PLUGINS_DIR) + ENDIF (QT_LIBRARY_DIR AND NOT QT_PLUGINS_DIR) ######################################## # # Setting the INCLUDE-Variables |