Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 25 additions & 7 deletions .github/workflows/build-ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ jobs:
- name: Install Apt dependencies
run: |
sudo apt-get update
sudo apt-get install -y build-essential cmake libx11-dev clang-format-14 ccache
sudo apt-get install -y build-essential cmake libx11-dev clang-format-14 ccache \
autoconf automake libtool pkg-config libudev-dev

- name: Install patchelf (Release only)
if: ${{ matrix.build_type == 'Release' }}
Expand All @@ -52,14 +53,24 @@ jobs:
with:
ngc-cli-api-key: ${{ secrets.NGC_TELEOP_CORE_GITHUB_SERVICE_KEY }}

# Hunter cache - caches depthai dependencies (OpenSSL, CURL, etc.)
- name: Cache Hunter packages
# vcpkg - required when BUILD_PLUGIN_OAK_CAMERA=ON for DepthAI v3.x deps
- name: Cache vcpkg
uses: actions/cache@v4
with:
path: ~/.hunter
key: hunter-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('cmake/SetupHunter.cmake') }}
path: |
~/vcpkg
build/vcpkg_installed
key: vcpkg-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('vcpkg.json') }}
restore-keys: |
hunter-${{ runner.os }}-${{ runner.arch }}-
vcpkg-${{ runner.os }}-${{ runner.arch }}-

- name: Setup vcpkg
run: |
if [ ! -f ~/vcpkg/vcpkg ]; then
git clone https://github.com/microsoft/vcpkg ~/vcpkg
~/vcpkg/bootstrap-vcpkg.sh -disableMetrics
fi
echo "VCPKG_ROOT=$HOME/vcpkg" >> $GITHUB_ENV

- name: Cache ccache
uses: actions/cache@v4
Expand All @@ -75,7 +86,14 @@ jobs:
ccache --show-config

- name: Configure CMake
run: cmake -B build -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DISAAC_TELEOP_PYTHON_VERSION=${{ matrix.python_version }} -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DBUILD_PLUGIN_OAK_CAMERA=ON
run: >
cmake -B build
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
-DISAAC_TELEOP_PYTHON_VERSION=${{ matrix.python_version }}
-DCMAKE_C_COMPILER_LAUNCHER=ccache
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache
-DBUILD_PLUGIN_OAK_CAMERA=ON
-DCMAKE_TOOLCHAIN_FILE=${{ env.VCPKG_ROOT }}/scripts/buildsystems/vcpkg.cmake

- name: Build
run: cmake --build build --parallel 4
Expand Down
31 changes: 21 additions & 10 deletions .github/workflows/build-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,29 @@ jobs:
- name: Install sccache
run: choco install -y sccache

# Hunter cache - caches depthai dependencies
# Note: Hunter uses C:/.hunter on Windows (at drive root)
- name: Cache Hunter packages
# Put cl.exe and other build tools in PATH.
# Must run before vcpkg setup so our VCPKG_ROOT isn't overridden by vcvarsall.
- name: Setup MSVC (Developer Command Prompt)
uses: ilammy/msvc-dev-cmd@v1

# vcpkg - required when BUILD_PLUGIN_OAK_CAMERA=ON for DepthAI v3.x deps
- name: Cache vcpkg
uses: actions/cache@v4
with:
path: C:/.hunter
key: hunter-${{ runner.os }}-${{ hashFiles('cmake/SetupHunter.cmake') }}
path: |
C:\vcpkg
build\vcpkg_installed
key: vcpkg-${{ runner.os }}-${{ hashFiles('vcpkg.json') }}
restore-keys: |
hunter-${{ runner.os }}-
vcpkg-${{ runner.os }}-

- name: Setup vcpkg
run: |
if (!(Test-Path C:\vcpkg\vcpkg.exe)) {
git clone https://github.com/microsoft/vcpkg C:\vcpkg
C:\vcpkg\bootstrap-vcpkg.bat -disableMetrics
}
echo "VCPKG_ROOT=C:\vcpkg" >> $env:GITHUB_ENV

- name: Cache sccache
uses: actions/cache@v4
Expand All @@ -58,10 +72,6 @@ jobs:
run: |
sccache --version

# Put cl.exe and other build tools in PATH
- name: Setup MSVC (Developer Command Prompt)
uses: ilammy/msvc-dev-cmd@v1

- name: Configure CMake
# Note:
# sccache does not work with VSBuild, so we use Ninja generator here.
Expand All @@ -77,6 +87,7 @@ jobs:
-DCMAKE_CXX_COMPILER="cl.exe"
-DCMAKE_MSVC_DEBUG_INFORMATION_FORMAT=Embedded
-DBUILD_PLUGIN_OAK_CAMERA=ON
-DCMAKE_TOOLCHAIN_FILE=${{ env.VCPKG_ROOT }}/scripts/buildsystems/vcpkg.cmake

- name: Build
run: cmake --build build --parallel
Expand Down
22 changes: 4 additions & 18 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

cmake_minimum_required(VERSION 3.20...3.25)
Expand All @@ -10,22 +10,12 @@ include(cmake/IsaacTeleopVersion.cmake)
isaac_teleop_read_version("${CMAKE_CURRENT_SOURCE_DIR}/VERSION" ISAAC_TELEOP_VERSION ISAAC_TELEOP_PYPROJECT_VERSION)

# ==============================================================================
# Install Prefix Setup (must be before HunterGate)
# Install Prefix Setup
# ==============================================================================
# Set default install prefix early, before HunterGate which may affect
# CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT
if(NOT DEFINED CMAKE_INSTALL_PREFIX OR CMAKE_INSTALL_PREFIX STREQUAL "" OR CMAKE_INSTALL_PREFIX MATCHES "^/usr/local")
set(CMAKE_INSTALL_PREFIX "${CMAKE_CURRENT_SOURCE_DIR}/install" CACHE PATH "Install prefix" FORCE)
endif()

# OAK camera plugin uses Hunter/DepthAI; optional so builds like teleop_ros2 can skip it.
option(BUILD_PLUGIN_OAK_CAMERA "Build OAK camera plugin (uses Hunter/DepthAI)" OFF)
# ==============================================================================

# HunterGate Setup (must be before project())
# Defines BUILD_PLUGINS option and initializes Hunter for DepthAI dependencies
include(cmake/SetupHunter.cmake)

project(IsaacTeleop VERSION ${ISAAC_TELEOP_VERSION} LANGUAGES CXX)

set(CMAKE_CXX_STANDARD 20)
Expand All @@ -51,13 +41,9 @@ if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release CACHE STRING "Build type" FORCE)
endif()

# Note: CMAKE_INSTALL_PREFIX is set early (before HunterGate) to avoid issues
# with CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT being affected by Hunter's
# internal project() call.

# Options
# Note: BUILD_PLUGINS is defined in cmake/SetupHunter.cmake before project()
# Note: BUILD_PYTHON_BINDINGS is defined in cmake/SetupPython.cmake
option(BUILD_PLUGINS "Build plugins" ON)
option(BUILD_PLUGIN_OAK_CAMERA "Build OAK camera plugin (requires vcpkg for DepthAI v3.x)" OFF)
option(BUILD_EXAMPLES "Build examples" ON)
option(BUILD_EXAMPLE_TELEOP_ROS2 "Build only the teleop_ros2 example (e.g. for Docker)" OFF)
option(BUILD_TESTING "Build unit tests" ON)
Expand Down
13 changes: 0 additions & 13 deletions cmake/Hunter/config.cmake

This file was deleted.

112 changes: 0 additions & 112 deletions cmake/SetupHunter.cmake

This file was deleted.

Loading