CI(macos): install orbbec/depthai to /usr/local so find_package finds them

OrbbecSDK defaults its install prefix to /opt/OrbbecSDK and depthai-core
to <build>/install, so under DESTDIR they staged outside usr/local and
the install step (which copies only <stage>/usr/local) silently skipped
them - hence find_package(OrbbecSDK)/find_package(depthai) failed while
gtsam/libpointmatcher (which default to /usr/local) were found. Force
-DCMAKE_INSTALL_PREFIX=/usr/local for both, and bump their cache keys so
the already-cached bad-prefix stages are not restored.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
This commit is contained in:
matlabbe
2026-06-28 16:05:23 -07:00
co-authored by Claude Opus 4.8
parent a260d7e832
commit d39733b995
@@ -97,7 +97,7 @@ runs:
uses: actions/cache@v4
with:
path: ${{ runner.temp }}/deps-stage/orbbec
key: orbbec-2.8.7-${{ inputs.os }}-${{ hashFiles('.github/actions/install-macos-source-deps/patches/orbbecsdk-2.8.7-cmake-config-install.patch') }}-${{ steps.depver.outputs.hash }}
key: orbbec-2.8.7-usrlocal-${{ inputs.os }}-${{ hashFiles('.github/actions/install-macos-source-deps/patches/orbbecsdk-2.8.7-cmake-config-install.patch') }}-${{ steps.depver.outputs.hash }}
- name: Build OrbbecSDK
if: steps.cache-orbbec.outputs.cache-hit != 'true'
@@ -112,7 +112,9 @@ runs:
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=${{ inputs.build_type }} -DOB_BUILD_DOCS=OFF -DOB_BUILD_EXAMPLES=OFF -DOB_BUILD_TOOLS=OFF -DOB_INSTALL_EXAMPLES_SOURCE=OFF
# OrbbecSDK defaults its install prefix to /opt/OrbbecSDK; force /usr/local
# so it stages under usr/local like the other deps and is installed/found.
cmake -B build -DCMAKE_BUILD_TYPE=${{ inputs.build_type }} -DCMAKE_INSTALL_PREFIX=/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
@@ -122,7 +124,7 @@ runs:
uses: actions/cache@v4
with:
path: ${{ runner.temp }}/deps-stage/depthai
key: depthai-2.32.0-${{ inputs.os }}-${{ hashFiles('.github/actions/install-macos-source-deps/patches/depthai-2.32.0-hunter-macos.patch') }}-${{ steps.depver.outputs.hash }}
key: depthai-2.32.0-usrlocal-${{ inputs.os }}-${{ hashFiles('.github/actions/install-macos-source-deps/patches/depthai-2.32.0-hunter-macos.patch') }}-${{ steps.depver.outputs.hash }}
- name: Build depthai
if: steps.cache-depthai.outputs.cache-hit != 'true'
@@ -150,8 +152,11 @@ runs:
CMAKE3="$SRC/cmake3-venv/bin/cmake"
# DEPTHAI_ENABLE_CURL=OFF: Hunter's CURL drags in the broken zlib and also
# fails to configure on this toolchain; rtabmap doesn't need depthai's CURL.
# depthai-core defaults its install prefix to <build>/install; force
# /usr/local so it stages under usr/local like the other deps.
"$CMAKE3" -B build \
-DCMAKE_BUILD_TYPE=${{ inputs.build_type }} \
-DCMAKE_INSTALL_PREFIX=/usr/local \
-DBUILD_SHARED_LIBS=ON \
-DDEPTHAI_ENABLE_CURL=OFF \
-DDEPTHAI_BUILD_TESTS=OFF \