summaryrefslogtreecommitdiff
path: root/Utilities/CMakeLists.txt
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2013-08-07 09:59:33 -0400
committerBrad King <brad.king@kitware.com>2013-08-07 09:59:33 -0400
commit8120e13f40fe5fed54cb47a8606d72d3269263ad (patch)
tree737380d675f6fcacfc692b7ceaf828ef2da6ae7e /Utilities/CMakeLists.txt
parent7c9f0c664f5782c09c686b8e51fe50245463914b (diff)
downloadcmake-8120e13f40fe5fed54cb47a8606d72d3269263ad.tar.gz
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.
Diffstat (limited to 'Utilities/CMakeLists.txt')
-rw-r--r--Utilities/CMakeLists.txt10
1 files changed, 5 insertions, 5 deletions
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}")