Skip to content

Commit 899102e

Browse files
committed
Fixes install for Qt-based apps when using cmake and MSVC generators.
1 parent 242ef5f commit 899102e

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

LSLCMake.cmake

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -139,14 +139,13 @@ function(installLSLAppSingleFolder target)
139139
file (TO_NATIVE_PATH "${QT_BIN_DIR}" QT_BIN_DIR_NATIVE)
140140
# It's safer to use `\` separators in the Path, but we need to escape them
141141
string (REPLACE "\\" "\\\\" QT_BIN_DIR_NATIVE "${QT_BIN_DIR_NATIVE}")
142-
143142
set(QT_DEPLOYQT_FLAGS --no-translations --no-system-d3d-compiler --no-opengl-sw --no-compiler-runtime)
144-
file(GENERATE OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${target}_path"
145-
CONTENT "$<TARGET_FILE:${target}>"
143+
file(GENERATE OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${target}_$<CONFIG>_path"
144+
CONTENT "$<TARGET_FILE:${target}>" # Full path to .exe file
146145
)
147146
get_filename_component(appdir ${appbin} DIRECTORY CACHE)
148147
install (CODE "
149-
file(READ \"${CMAKE_CURRENT_BINARY_DIR}/${target}_path\" _file)
148+
file(READ \"${CMAKE_CURRENT_BINARY_DIR}/${target}_${CMAKE_BUILD_TYPE}_path\" _file)
150149
message (STATUS \"Running Qt Deploy Tool for \${_file}\")
151150
if (CMAKE_INSTALL_CONFIG_NAME STREQUAL \"Debug\")
152151
set(QT_DEPLOYQT_FLAGS \"\${QT_DEPLOYQT_FLAGS} --debug\")

0 commit comments

Comments
 (0)