Skip to content

Commit d48e012

Browse files
test
1 parent f7f72ce commit d48e012

2 files changed

Lines changed: 9 additions & 6 deletions

File tree

src/CMakeLists.txt

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -224,11 +224,6 @@ if (WIN32)
224224
"${OPENSSL_ROOT_DIR}/bin/libcrypto-1_1.dll" "${CMAKE_BINARY_DIR}/deploy"
225225
)
226226

227-
configure_file(
228-
"${CMAKE_CURRENT_SOURCE_DIR}/windows/openhdimagewriter.nsi.in"
229-
"${CMAKE_CURRENT_BINARY_DIR}/openhdimagewriter.nsi"
230-
@ONLY)
231-
232227
add_custom_command(TARGET ${PROJECT_NAME}
233228
POST_BUILD
234229
COMMAND "${WINDEPLOYQT}" --no-translations --no-webkit2 --no-opengl-sw --angle --qmldir "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_BINARY_DIR}/deploy/OpenHDImageWriter.exe")
@@ -247,7 +242,9 @@ if (WIN32)
247242
# miss them. Copy them explicitly so the NSIS script can bundle them, but
248243
# don't fail the build if a Qt installation omits the optional module.
249244
set(QT_QUICKCONTROLS_DLL "${Qt5_DIR}/../../../bin/Qt5QuickControls.dll")
245+
set(QT_QUICKCONTROLS_DLL_PRESENT OFF)
250246
if(EXISTS "${QT_QUICKCONTROLS_DLL}")
247+
set(QT_QUICKCONTROLS_DLL_PRESENT ON)
251248
add_custom_command(TARGET ${PROJECT_NAME}
252249
POST_BUILD
253250
COMMAND ${CMAKE_COMMAND} -E copy_if_different
@@ -276,6 +273,11 @@ if (WIN32)
276273
message(WARNING "Qt Quick Dialogs QML directory not found at ${QT_QUICKDIALOGS_QML_DIR}; skipping explicit staging")
277274
endif()
278275

276+
configure_file(
277+
"${CMAKE_CURRENT_SOURCE_DIR}/windows/openhdimagewriter.nsi.in"
278+
"${CMAKE_CURRENT_BINARY_DIR}/openhdimagewriter.nsi"
279+
@ONLY)
280+
279281
set(OPENHD_SETTINGS_MAP_JSON "${CMAKE_CURRENT_LIST_DIR}/../doc/openhd_settings_map.json")
280282
if (NOT EXISTS "${OPENHD_SETTINGS_MAP_JSON}")
281283
message(FATAL_ERROR "Unable to find openhd_settings_map.json at ${OPENHD_SETTINGS_MAP_JSON}")

src/windows/openhdimagewriter.nsi.in

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,8 +208,9 @@ File "deploy\Qt5Qml.dll"
208208
File "deploy\Qt5QmlModels.dll"
209209
File "deploy\Qt5QmlWorkerScript.dll"
210210
File "deploy\Qt5Quick.dll"
211-
IfFileExists "deploy\Qt5QuickControls.dll" 0 +2
211+
!if "@QT_QUICKCONTROLS_DLL_PRESENT@" == "ON"
212212
File "deploy\Qt5QuickControls.dll"
213+
!endif
213214
File "deploy\Qt5QuickControls2.dll"
214215
File "deploy\Qt5QuickTemplates2.dll"
215216
File "deploy\Qt5Svg.dll"

0 commit comments

Comments
 (0)