Skip to content

Commit f135bb8

Browse files
authored
Fix CMake build with OrbbecSDK v1.10.12 (#141)
1 parent e03eaf0 commit f135bb8

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

cpp/orbbec/CMakeLists.txt

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,13 @@ if(MSVC)
4848
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_RUNTIME_DLLS:vio_jsonl> $<TARGET_FILE_DIR:vio_jsonl>
4949
COMMAND_EXPAND_LISTS
5050
)
51-
endif()
51+
52+
# Explicitly copy live555.dll & ob_usb.dll (not included in TARGET_RUNTIME_DLLS:vio_jsonl)
53+
# NOTE: remove these lines if using older OrbbecSDK without live555.dll and ob_usb.dll
54+
set(LIVE555_DLL_PATH "${OrbbecSDK_LIBS_DIR}/live555.dll")
55+
set(OB_USB_DLL_PATH "${OrbbecSDK_LIBS_DIR}/ob_usb.dll")
56+
add_custom_command(TARGET vio_jsonl POST_BUILD
57+
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${LIVE555_DLL_PATH} $<TARGET_FILE_DIR:vio_jsonl>
58+
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${OB_USB_DLL_PATH} $<TARGET_FILE_DIR:vio_jsonl>
59+
)
60+
endif()

0 commit comments

Comments
 (0)