From e98e1e5cb051463d710bc5612b204bd4956b930b Mon Sep 17 00:00:00 2001 From: Jose Fonseca Date: Tue, 22 Mar 2016 17:55:55 +0000 Subject: cmake: Pass build type option to windeployqt. --- gui/CMakeLists.txt | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'gui') diff --git a/gui/CMakeLists.txt b/gui/CMakeLists.txt index 251ef3f4..06fd4919 100644 --- a/gui/CMakeLists.txt +++ b/gui/CMakeLists.txt @@ -153,10 +153,18 @@ if (WIN32 AND NOT CMAKE_CROSSCOMPILING AND NOT CMAKE_VERSION VERSION_LESS 3.1) string (REPLACE "\\" "\\\\" QT_BIN_DIR_NATIVE "${QT_BIN_DIR_NATIVE}") install (CODE " message (STATUS \"Running Qt Deploy Tool...\") + if (CMAKE_INSTALL_CONFIG_NAME STREQUAL \"Debug\") + list (APPEND QT_WINDEPLOYQT_FLAGS --debug) + elseif (CMAKE_INSTALL_CONFIG_NAME STREQUAL \"RelWithDebInfo\") + list (APPEND QT_WINDEPLOYQT_FLAGS --release-with-debug-info) + else () + list (APPEND QT_WINDEPLOYQT_FLAGS --release) + endif () execute_process (COMMAND \"${CMAKE_COMMAND}\" -E env \"Path=${QT_BIN_DIR_NATIVE};\$ENV{SystemRoot}\\\\System32;\$ENV{SystemRoot}\" \"${QT_WINDEPLOYQT_EXECUTABLE}\" + \${QT_WINDEPLOYQT_FLAGS} \"\${CMAKE_INSTALL_PREFIX}/bin/qapitrace.exe\" ) ") -- cgit v1.2.3