Skip to content

Commit 9d1eef1

Browse files
committed
build(win): Fix install in debug mode
1 parent e2fc3fe commit 9d1eef1

File tree

1 file changed

+26
-5
lines changed

1 file changed

+26
-5
lines changed

cmake/qt_deploy_win.cmake

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,33 @@ execute_process(COMMAND qmake6 -query QT_INSTALL_BINS OUTPUT_VARIABLE QT_INSTALL
66

77
string(STRIP ${QT_INSTALL_BINS} QT_INSTALL_BINS)
88

9+
# As this is executed as install script, we cannot simply use CMAKE_BUILD_TYPE
10+
set(DEBUG_BUILD FALSE)
11+
12+
if(EXISTS ${CMAKE_INSTALL_PREFIX}/bin/cored.dll)
13+
set(DEBUG_BUILD TRUE)
14+
endif()
15+
16+
if(DEBUG_BUILD)
17+
set(SWIFT_DLLS
18+
${CMAKE_INSTALL_PREFIX}/bin/cored.dll
19+
${CMAKE_INSTALL_PREFIX}/bin/guid.dll
20+
${CMAKE_INSTALL_PREFIX}/bin/inputd.dll
21+
${CMAKE_INSTALL_PREFIX}/bin/miscd.dll
22+
${CMAKE_INSTALL_PREFIX}/bin/soundd.dll
23+
)
24+
else()
25+
set(SWIFT_DLLS
26+
${CMAKE_INSTALL_PREFIX}/bin/core.dll
27+
${CMAKE_INSTALL_PREFIX}/bin/gui.dll
28+
${CMAKE_INSTALL_PREFIX}/bin/input.dll
29+
${CMAKE_INSTALL_PREFIX}/bin/misc.dll
30+
${CMAKE_INSTALL_PREFIX}/bin/sound.dll
31+
)
32+
endif()
33+
934
execute_process(COMMAND ${QT_INSTALL_BINS}/windeployqt.exe
10-
${CMAKE_INSTALL_PREFIX}/bin/core.dll
11-
${CMAKE_INSTALL_PREFIX}/bin/gui.dll
12-
${CMAKE_INSTALL_PREFIX}/bin/input.dll
13-
${CMAKE_INSTALL_PREFIX}/bin/misc.dll
14-
${CMAKE_INSTALL_PREFIX}/bin/sound.dll
35+
${SWIFT_DLLS}
1536
${CMAKE_INSTALL_PREFIX}/bin/swiftcore.exe
1637
${CMAKE_INSTALL_PREFIX}/bin/swiftdata.exe
1738
${CMAKE_INSTALL_PREFIX}/bin/swiftguistd.exe

0 commit comments

Comments
 (0)