Skip to content

Commit 0441828

Browse files
authored
Copy dll after every unzip to copy them at first compilation (#714)
1 parent 3613991 commit 0441828

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

SerialPrograms/CMakeLists.txt

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -614,16 +614,6 @@ if (WIN32)
614614
"${DEPLOY_DIR}/discord_partner_sdk.dll"
615615
)
616616

617-
# Copy 3rd party DLLs if missing/different
618-
file(GLOB THIRD_PARTY_DLLS "${REPO_ROOT_DIR}/3rdPartyBinaries/*.dll")
619-
foreach(DLL IN LISTS THIRD_PARTY_DLLS)
620-
get_filename_component(DLL_NAME "${DLL}" NAME)
621-
add_custom_command(
622-
TARGET SerialPrograms POST_BUILD
623-
COMMAND ${CMAKE_COMMAND} -E copy_if_different "${DLL}" "${DEPLOY_DIR}/${DLL_NAME}"
624-
)
625-
endforeach()
626-
627617
# Move built .exe and .pdb to deploy folder, print if pdb is missing
628618
add_custom_command(
629619
TARGET SerialPrograms POST_BUILD
@@ -659,6 +649,16 @@ if (WIN32)
659649
)
660650
endif()
661651

652+
# Copy 3rd party DLLs if missing/different
653+
file(GLOB THIRD_PARTY_DLLS "${REPO_ROOT_DIR}/3rdPartyBinaries/*.dll")
654+
foreach(DLL IN LISTS THIRD_PARTY_DLLS)
655+
get_filename_component(DLL_NAME "${DLL}" NAME)
656+
add_custom_command(
657+
TARGET SerialPrograms POST_BUILD
658+
COMMAND ${CMAKE_COMMAND} -E copy_if_different "${DLL}" "${DEPLOY_DIR}/${DLL_NAME}"
659+
)
660+
endforeach()
661+
662662
# Final target that depends on all deployment steps
663663
add_custom_target(DeployRuntime ALL
664664
DEPENDS SerialPrograms clone_packages run_windeployqt

0 commit comments

Comments
 (0)