From 1353ed0bd8d2d530fda16b3c407f085b3f77af9d Mon Sep 17 00:00:00 2001 From: Brad King Date: Tue, 24 Feb 2009 17:07:04 -0500 Subject: [PATCH] BUG: Fix cmake-gui docs generation PATH feature Automatic addition of the Qt DLL location to PATH can be done only for generators that use a Windows shell. --- Utilities/CMakeLists.txt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Utilities/CMakeLists.txt b/Utilities/CMakeLists.txt index 499bb42bc..6f7845ef2 100644 --- a/Utilities/CMakeLists.txt +++ b/Utilities/CMakeLists.txt @@ -32,14 +32,17 @@ MACRO(ADD_DOCS target dependency) ENDMACRO(ADD_DOCS target dependency) # Help cmake-gui find the Qt DLLs on Windows. -IF(BUILD_QtDialog AND WIN32 AND EXISTS "${QT_QMAKE_EXECUTABLE}") +SET(WIN_SHELL_GENS "Visual Studio|NMake|MinGW|Watcom|Borland") +IF(BUILD_QtDialog AND "${CMAKE_GENERATOR}" MATCHES "${WIN_SHELL_GENS}" + AND EXISTS "${QT_QMAKE_EXECUTABLE}" AND NOT CMAKE_NO_AUTO_QT_ENV) GET_FILENAME_COMPONENT(Qt_BIN_DIR "${QT_QMAKE_EXECUTABLE}" PATH) IF(EXISTS "${Qt_BIN_DIR}/QtCore4.dll") # Tell the macro to set the path before running cmake-gui. STRING(REPLACE ";" "\\;" _PATH "PATH=${Qt_BIN_DIR};%PATH%") SET(cmake-gui-PATH COMMAND set "${_PATH}") ENDIF(EXISTS "${Qt_BIN_DIR}/QtCore4.dll") -ENDIF(BUILD_QtDialog AND WIN32 AND EXISTS "${QT_QMAKE_EXECUTABLE}") +ENDIF(BUILD_QtDialog AND "${CMAKE_GENERATOR}" MATCHES "${WIN_SHELL_GENS}" + AND EXISTS "${QT_QMAKE_EXECUTABLE}" AND NOT CMAKE_NO_AUTO_QT_ENV) # add the docs for the executables ADD_DOCS(ctest ${CMake_SOURCE_DIR}/Utilities/Doxygen/authors.txt)