From 8120e13f40fe5fed54cb47a8606d72d3269263ad Mon Sep 17 00:00:00 2001 From: Brad King Date: Wed, 7 Aug 2013 09:59:33 -0400 Subject: cmake-gui: Fix build rules for Qt5 on Windows Set policy CMP0020 to NEW to get WinMain from Qt. Fix the documentation custom command PATH for cmake-gui to find the Qt5 DLLs. --- Utilities/CMakeLists.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'Utilities/CMakeLists.txt') diff --git a/Utilities/CMakeLists.txt b/Utilities/CMakeLists.txt index b8f6b3cb67..91965e9b11 100644 --- a/Utilities/CMakeLists.txt +++ b/Utilities/CMakeLists.txt @@ -72,11 +72,11 @@ macro(ADD_DOCS target dependency) endmacro() # Help cmake-gui find the Qt DLLs on Windows. -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") +if(TARGET cmake-gui) + get_property(Qt_BIN_DIR TARGET cmake-gui PROPERTY Qt_BIN_DIR) + set(WIN_SHELL_GENS "Visual Studio|NMake|MinGW|Watcom|Borland") + if(Qt_BIN_DIR AND "${CMAKE_GENERATOR}" MATCHES "${WIN_SHELL_GENS}" + AND NOT CMAKE_NO_AUTO_QT_ENV) # 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}") -- cgit v1.2.1