orbbec ci

This commit is contained in:
matlabbe
2026-06-28 14:41:35 -07:00
parent 143f4a744b
commit ecda4f5e81
3 changed files with 64 additions and 9 deletions
@@ -0,0 +1,29 @@
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 261f2cda..644e068f 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -92,17 +92,20 @@ if(OB_IS_MAIN_PROJECT)
)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/generated/Export.h" DESTINATION include/libobsensor/h)
- install(EXPORT ${OB_SDK_LIB_NAME}Config NAMESPACE ob:: DESTINATION lib)
+ install(EXPORT ${OB_SDK_LIB_NAME}Config NAMESPACE ob:: DESTINATION lib/cmake/${OB_SDK_LIB_NAME})
include(CMakePackageConfigHelpers)
+ # Name the version file <pkg>ConfigVersion.cmake (not <pkg>Version.cmake) and
+ # install it next to the config in lib/cmake/<pkg>, so find_package(OrbbecSDK)
+ # discovers it in config mode and reads its version.
write_basic_package_version_file(
- "${CMAKE_CURRENT_BINARY_DIR}/${OB_SDK_LIB_NAME}Version.cmake"
+ "${CMAKE_CURRENT_BINARY_DIR}/${OB_SDK_LIB_NAME}ConfigVersion.cmake"
VERSION "${PROJECT_VERSION}"
COMPATIBILITY SameMajorVersion
)
install(
- FILES "${CMAKE_CURRENT_BINARY_DIR}/${OB_SDK_LIB_NAME}Version.cmake"
- DESTINATION lib
+ FILES "${CMAKE_CURRENT_BINARY_DIR}/${OB_SDK_LIB_NAME}ConfigVersion.cmake"
+ DESTINATION lib/cmake/${OB_SDK_LIB_NAME}
)
if(MSVC)
install(FILES $<TARGET_PDB_FILE:${OB_SDK_LIB_NAME}> DESTINATION bin OPTIONAL)
+30 -6
View File
@@ -26,16 +26,16 @@ jobs:
include: include:
- build_name: macos-sequoia-intel - build_name: macos-sequoia-intel
os: macos-15-intel os: macos-15-intel
extra_cmake_def: '-DBUILD_AS_BUNDLE=ON' extra_cmake_def: '-DBUILD_AS_BUNDLE=ON -DWITH_ORBBEC_SDK=ON'
- build_name: macos-sequoia-apple-silicon - build_name: macos-sequoia-apple-silicon
os: macos-15 os: macos-15
extra_cmake_def: '-DBUILD_AS_BUNDLE=ON' extra_cmake_def: '-DBUILD_AS_BUNDLE=ON -DWITH_ORBBEC_SDK=ON'
- build_name: macos-tahoe-intel - build_name: macos-tahoe-intel
os: macos-26-intel os: macos-26-intel
extra_cmake_def: '-DBUILD_AS_BUNDLE=ON' extra_cmake_def: '-DBUILD_AS_BUNDLE=ON -DWITH_ORBBEC_SDK=ON'
- build_name: macos-tahoe-apple-silicon - build_name: macos-tahoe-apple-silicon
os: macos-26 os: macos-26
extra_cmake_def: '-DBUILD_AS_BUNDLE=ON' extra_cmake_def: '-DBUILD_AS_BUNDLE=ON -DWITH_ORBBEC_SDK=ON'
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
@@ -43,7 +43,7 @@ jobs:
- name: Install Brew Dependencies - name: Install Brew Dependencies
run: | run: |
# Update brew and install from Brewfile if present, or specific packages # Update brew and install from Brewfile if present, or specific packages
brew install pcl opencv octomap g2o pdal yaml-cpp brew install pcl opencv octomap g2o pdal yaml-cpp librealsense libfreenect libusb
- name: Resolve dependency versions - name: Resolve dependency versions
id: depver id: depver
@@ -109,7 +109,31 @@ jobs:
git clone --depth 1 --branch 1.4.4 https://github.com/ethz-asl/libpointmatcher.git "$SRC/libpointmatcher" git clone --depth 1 --branch 1.4.4 https://github.com/ethz-asl/libpointmatcher.git "$SRC/libpointmatcher"
cd "$SRC/libpointmatcher" cd "$SRC/libpointmatcher"
git apply "$PATCHES/libpointmatcher-1.4.4-boost.patch" git apply "$PATCHES/libpointmatcher-1.4.4-boost.patch"
cmake -B build -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -DCMAKE_PREFIX_PATH="$STAGE/usr/local" cmake -B build -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -DCMAKE_PREFIX_PATH="$STAGE/usr/local" -DBUILD_EVALUATIONS=OFF -DBUILD_EXAMPLES=OFF
cmake --build build -j$NPROC
DESTDIR="$STAGE" cmake --install build
# --- orbbec SDK ---
git clone --depth 1 --branch v2.8.7 https://github.com/orbbec/OrbbecSDK_v2.git "$SRC/OrbbecSDK_v2"
cd "$SRC/OrbbecSDK_v2"
git apply "$PATCHES/orbbecsdk-2.8.7-cmake-config-install.patch"
cmake -B build -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -DCMAKE_PREFIX_PATH="$STAGE/usr/local" -DOB_BUILD_DOCS=OFF -DOB_BUILD_EXAMPLES=OFF -DOB_BUILD_TOOLS=OFF -DOB_INSTALL_EXAMPLES_SOURCE=OFF
cmake --build build -j$NPROC
DESTDIR="$STAGE" cmake --install build
# --- depthai ---
git clone --depth 1 --branch v2.32.0 https://github.com/luxonis/depthai-core.git "$SRC/depthai-core"
cd "$SRC/depthai-core"
git submodule update --init --recursive
git apply "$PATCHES/depthai-2.32.0-homebrew-no-vcpkg"
PREFIX="$(brew --prefix);$(brew --prefix libarchive);$(brew --prefix openssl@3);$(brew --prefix bzip2);$(brew --prefix zlib)"
cmake -B build --preset minimal \
-DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} \
-DCMAKE_PREFIX_PATH="$STAGE/usr/local" \
-DBUILD_SHARED_LIBS=ON \
-DDEPTHAI_BOOTSTRAP_VCPKG=OFF \
-DDEPTHAI_OPENCV_SUPPORT=ON \
-DCMAKE_PREFIX_PATH="$PREFIX"
cmake --build build -j$NPROC cmake --build build -j$NPROC
DESTDIR="$STAGE" cmake --install build DESTDIR="$STAGE" cmake --install build
+5 -3
View File
@@ -208,7 +208,7 @@ option(WITH_REALSENSE "Include RealSense support" ON)
option(WITH_REALSENSE_SLAM "Include RealSenseSlam support" ON) option(WITH_REALSENSE_SLAM "Include RealSenseSlam support" ON)
option(WITH_REALSENSE2 "Include RealSense2 support" ON) option(WITH_REALSENSE2 "Include RealSense2 support" ON)
option(WITH_MYNTEYE "Include mynteye-s support" ON) option(WITH_MYNTEYE "Include mynteye-s support" ON)
option(WITH_DEPTHAI "Include depthai-core support" OFF) option(WITH_DEPTHAI "Include depthai-core v2 support" OFF)
option(WITH_XVSDK "Include XVisio SDK support" OFF) option(WITH_XVSDK "Include XVisio SDK support" OFF)
option(WITH_ORBBEC_SDK "Include Orbbec SDK v2 support" OFF) option(WITH_ORBBEC_SDK "Include Orbbec SDK v2 support" OFF)
option(WITH_OCTOMAP "Include OctoMap support" ON) option(WITH_OCTOMAP "Include OctoMap support" ON)
@@ -711,7 +711,9 @@ IF(WITH_MYNTEYE)
ENDIF(WITH_MYNTEYE) ENDIF(WITH_MYNTEYE)
IF(WITH_DEPTHAI) IF(WITH_DEPTHAI)
FIND_PACKAGE(depthai 2.24) # Force DepthAI major version 2 (>=2.24, <3.0): the v3 API is not yet
# supported (see CameraDepthAI).
FIND_PACKAGE(depthai 2.24...<3.0)
IF(depthai_FOUND) IF(depthai_FOUND)
MESSAGE(STATUS "Found depthai-core (targets)") MESSAGE(STATUS "Found depthai-core (targets)")
ENDIF(depthai_FOUND) ENDIF(depthai_FOUND)
@@ -1877,7 +1879,7 @@ MESSAGE(STATUS " With DepthAI ${depthai_VERSION} = YES (License: MIT)")
ELSEIF(NOT WITH_DEPTHAI) ELSEIF(NOT WITH_DEPTHAI)
MESSAGE(STATUS " With DepthAI = NO (WITH_DEPTHAI=OFF)") MESSAGE(STATUS " With DepthAI = NO (WITH_DEPTHAI=OFF)")
ELSE() ELSE()
MESSAGE(STATUS " With DepthAI = NO (depthai-core not found)") MESSAGE(STATUS " With DepthAI = NO (depthai-core v2 not found)")
ENDIF() ENDIF()
IF(xvsdk_FOUND) IF(xvsdk_FOUND)