From 2204acc15efd97b919847f078c51da3812a6a065 Mon Sep 17 00:00:00 2001 From: Lawn Meower Date: Fri, 22 Nov 2024 19:04:57 +0100 Subject: [PATCH] cmake: copy ftd2xx.dll to exe folder --- MungPlex/CMakeLists.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/MungPlex/CMakeLists.txt b/MungPlex/CMakeLists.txt index f5051df..b255f7e 100644 --- a/MungPlex/CMakeLists.txt +++ b/MungPlex/CMakeLists.txt @@ -181,6 +181,11 @@ if (CMAKE_BUILD_TYPE STREQUAL "Debug") COMMAND ${CMAKE_COMMAND} -E copy_if_different ${LOVENSE_LIB_DIR}/Debug/LovenseToys.dll ${OUT_DIR}/x64-Debug/MungPlex) + + add_custom_command(TARGET MungPlex POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy_if_different + ${FT_LIB_FOLDER}/amd64/ftd2xx64.dll + ${OUT_DIR}/x64-Debug/MungPlex/ftd2xx.dll) elseif (CMAKE_BUILD_TYPE STREQUAL "Release") target_link_libraries(MungPlex PRIVATE ${LOVENSE_LIB_DIR}/Release/LovenseToys.lib) @@ -188,6 +193,11 @@ elseif (CMAKE_BUILD_TYPE STREQUAL "Release") COMMAND ${CMAKE_COMMAND} -E copy_if_different ${LOVENSE_LIB_DIR}/Release/LovenseToys.dll ${OUT_DIR}/x64-Release/MungPlex) + + add_custom_command(TARGET MungPlex POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy_if_different + ${FT_LIB_FOLDER}/amd64/ftd2xx64.dll + ${OUT_DIR}/x64-Release/MungPlex/ftd2xx.dll) endif() # Set C++ version