Skip to content

Commit

Permalink
WIP: deployment: copy mosquitto dlls next to binary
Browse files Browse the repository at this point in the history
  • Loading branch information
marcothaller committed Nov 8, 2024
1 parent 0964285 commit f08c873
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion demo/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
$<TARGET_RUNTIME_DLLS:${TARGET_NAME}>
$<TARGET_FILE_DIR:${TARGET_NAME}> 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"
$<TARGET_FILE_DIR:${TARGET_NAME}>)
add_custom_command(TARGET ${TARGET_NAME} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different
"C:/Program Files/mosquitto/mosquittopp.dll"
$<TARGET_FILE_DIR:${TARGET_NAME}>)
add_custom_command(TARGET ${TARGET_NAME} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different
"C:/Program Files/mosquitto/libcrypto-3-x64.dll"
$<TARGET_FILE_DIR:${TARGET_NAME}>)
add_custom_command(TARGET ${TARGET_NAME} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different
"C:/Program Files/mosquitto/libssl-3-x64.dll"
$<TARGET_FILE_DIR:${TARGET_NAME}>)
add_custom_command(TARGET ${TARGET_NAME} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different
"C:/Program Files/mosquitto/pthreadVC3.dll"
$<TARGET_FILE_DIR:${TARGET_NAME}>)
endif()
endif()

0 comments on commit f08c873

Please sign in to comment.