From 93376c3b6d90209684852fbdf6030d75390a5b81 Mon Sep 17 00:00:00 2001 From: Valtteri Kaatrasalo <46484036+kaatrasa@users.noreply.github.com> Date: Wed, 11 Sep 2024 12:29:03 +0300 Subject: [PATCH] Fix CMake build with OrbbecSDK v1.10.12 (#47) --- cpp/orbbec/CMakeLists.txt | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/cpp/orbbec/CMakeLists.txt b/cpp/orbbec/CMakeLists.txt index 60ea7d3..4dc5361 100644 --- a/cpp/orbbec/CMakeLists.txt +++ b/cpp/orbbec/CMakeLists.txt @@ -43,4 +43,13 @@ if(MSVC) COMMAND ${CMAKE_COMMAND} -E copy $ $ COMMAND_EXPAND_LISTS ) -endif() + + # Explicitly copy live555.dll & ob_usb.dll (not included in TARGET_RUNTIME_DLLS:sai-record-orbbec) + # NOTE: remove these lines if using older OrbbecSDK without live555.dll and ob_usb.dll + set(LIVE555_DLL_PATH "${OrbbecSDK_LIBS_DIR}/live555.dll") + set(OB_USB_DLL_PATH "${OrbbecSDK_LIBS_DIR}/ob_usb.dll") + add_custom_command(TARGET sai-record-orbbec POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy_if_different ${LIVE555_DLL_PATH} $ + COMMAND ${CMAKE_COMMAND} -E copy_if_different ${OB_USB_DLL_PATH} $ + ) +endif() \ No newline at end of file