diff --git a/demo/CMakeLists.txt b/demo/CMakeLists.txt index 2a02835..46f5e2e 100644 --- a/demo/CMakeLists.txt +++ b/demo/CMakeLists.txt @@ -19,8 +19,32 @@ if (WIN32) target_compile_definitions(${TARGET_NAME} PRIVATE NOMINMAX) # Deployment: On Windows, copy the Slint DLL next to the application binary so that it's found. add_custom_command(TARGET ${TARGET_NAME} POST_BUILD - COMMAND ${CMAKE_COMMAND} -E copy + COMMAND ${CMAKE_COMMAND} -E copy_if_different $ $ COMMAND_EXPAND_LISTS ) + # Deployment: On Windows, copy the mosquitto DLLs next to the application binary so that they're found. + # TODO -> this can probably be dropped in case we add all mosquitto dlls to TARGET_RUNTIME_DLLS + if (BUILD_INTEGRATION_MQTT) + add_custom_command(TARGET ${TARGET_NAME} POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy_if_different + "C:/Program Files/mosquitto/mosquitto.dll" + $) + add_custom_command(TARGET ${TARGET_NAME} POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy_if_different + "C:/Program Files/mosquitto/mosquittopp.dll" + $) + add_custom_command(TARGET ${TARGET_NAME} POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy_if_different + "C:/Program Files/mosquitto/libcrypto-3-x64.dll" + $) + add_custom_command(TARGET ${TARGET_NAME} POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy_if_different + "C:/Program Files/mosquitto/libssl-3-x64.dll" + $) + add_custom_command(TARGET ${TARGET_NAME} POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy_if_different + "C:/Program Files/mosquitto/pthreadVC3.dll" + $) + endif() endif()