diff --git a/recorder/CMakeLists.txt b/recorder/CMakeLists.txt index 8ec3066..105f0dd 100644 --- a/recorder/CMakeLists.txt +++ b/recorder/CMakeLists.txt @@ -52,6 +52,13 @@ if(WIN32) set(K4ARECORD_LIB "${K4A_WRAPPER_DIR}/${K4A_WRAPPER_BUILD_SUBDIR}/bin/k4arecord.lib") endif() +# The SDK's library-target name. v2.8.6 (the Nano) sets OB_SDK_LIB_NAME in the +# example scope; v2.4.3 (JetPack 6 Orin) does not, leaving "ob::" — a CMake error. +# The stock examples link ob::OrbbecSDK, so default to that when it is unset. +if(NOT OB_SDK_LIB_NAME) + set(OB_SDK_LIB_NAME OrbbecSDK) +endif() + target_link_libraries(${PROJECT_NAME} ob::${OB_SDK_LIB_NAME} ob::examples::utils