Skip to content

Fix DEPTHAI_VCPKG_INTERNAL_ONLY option#1741

Open
Amronos wants to merge 1 commit intoluxonis:developfrom
Amronos:fix-depthai_vcpkg_internal_only
Open

Fix DEPTHAI_VCPKG_INTERNAL_ONLY option#1741
Amronos wants to merge 1 commit intoluxonis:developfrom
Amronos:fix-depthai_vcpkg_internal_only

Conversation

@Amronos
Copy link
Copy Markdown
Contributor

@Amronos Amronos commented Apr 3, 2026

Purpose

The DEPTHAI_VCPKG_INTERNAL_ONLY option had behaviour opposite to its description. I have corrected this behaviour and changed the default value to OFF.

Specification

None / not applicable

Dependencies & Potential Impact

None / not applicable

Deployment Plan

None / not applicable

Testing & Validation

None / not applicable

Summary by CodeRabbit

  • Chores
    • Adjusted default build configuration: changed how internal-only package handling and automatic selection of external interface libraries are determined, affecting which external libraries are used by default during builds.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 3, 2026

📝 Walkthrough

Walkthrough

The default for the CMake option DEPTHAI_VCPKG_INTERNAL_ONLY was changed from ON to OFF, and the conditional that sets USE_EXTERNAL_INTERFACE_LIBS_DEFAULT was inverted, which alters the computed defaults for DEPTHAI_JSON_EXTERNAL, DEPTHAI_LIBNOP_EXTERNAL, and DEPTHAI_XTENSOR_EXTERNAL.

Changes

Cohort / File(s) Summary
CMake Configuration Defaults
cmake/depthaiOptions.cmake
Changed default of DEPTHAI_VCPKG_INTERNAL_ONLY from ONOFF; inverted conditional that sets USE_EXTERNAL_INTERFACE_LIBS_DEFAULT, affecting defaults for DEPTHAI_JSON_EXTERNAL, DEPTHAI_LIBNOP_EXTERNAL, and DEPTHAI_XTENSOR_EXTERNAL.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐇 I flipped a flag with a twitch of my paw,
Defaults danced differently — what a small awe.
External libs wake, internal ones rest,
Configuration hopped to its new little nest.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Fix DEPTHAI_VCPKG_INTERNAL_ONLY option' directly matches the main objective of the PR, which is to fix the CMake option behavior and default value.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@moratom moratom added the testable PR is ready to be tested label Apr 3, 2026
@Amronos Amronos changed the base branch from main to develop April 3, 2026 12:21
@Amronos Amronos force-pushed the fix-depthai_vcpkg_internal_only branch from ac743e3 to fc291ff Compare April 9, 2026 18:18
Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@cmake/depthaiOptions.cmake`:
- Line 45: The option DEPTHAI_VCPKG_INTERNAL_ONLY has an ambiguous help string;
update its description to explicitly state behavior when enabled—e.g., that
enabling DEPTHAI_VCPKG_INTERNAL_ONLY causes interface dependencies to be
resolved externally by default (sets DEPTHAI_*_EXTERNAL=ON semantics) and that
find_package will be used for those interface libs—so future maintainers
understand its effect and interactions with find_package and DEPTHAI_*_EXTERNAL
variables.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 885373c4-e519-4e9c-872c-7d4515fbcc42

📥 Commits

Reviewing files that changed from the base of the PR and between ac743e3 and fc291ff.

📒 Files selected for processing (1)
  • cmake/depthaiOptions.cmake
📜 Review details
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: MaticTonin
Repo: luxonis/depthai-core PR: 1732
File: src/pipeline/Pipeline.cpp:662-662
Timestamp: 2026-03-24T22:39:00.650Z
Learning: In `src/pipeline/Pipeline.cpp`, the `DEPTHAI_AUTOCALIBRATION` environment variable intentionally defaults to `"ON_START"` (not `""`). This means auto-calibration is initialized by default for stereo pipelines at pipeline build time. The resulting implicit EEPROM/calibration writes on startup are by design and should not be flagged as a backward-incompatible change or unintended side-effect in future reviews.
📚 Learning: 2026-03-24T22:39:00.650Z
Learnt from: MaticTonin
Repo: luxonis/depthai-core PR: 1732
File: src/pipeline/Pipeline.cpp:662-662
Timestamp: 2026-03-24T22:39:00.650Z
Learning: In `src/pipeline/Pipeline.cpp`, the `DEPTHAI_AUTOCALIBRATION` environment variable intentionally defaults to `"ON_START"` (not `""`). This means auto-calibration is initialized by default for stereo pipelines at pipeline build time. The resulting implicit EEPROM/calibration writes on startup are by design and should not be flagged as a backward-incompatible change or unintended side-effect in future reviews.

Applied to files:

  • cmake/depthaiOptions.cmake
🔇 Additional comments (1)
cmake/depthaiOptions.cmake (1)

45-50: Good fix: option behavior now matches intent.

This default/conditional combination is now consistent and correctly drives the downstream interface dependency defaults.

# ---------- Dependency Management -------------
option(DEPTHAI_BOOTSTRAP_VCPKG "Automatically bootstrap VCPKG" ON)
option(DEPTHAI_VCPKG_INTERNAL_ONLY "Use VCPKG internally, but not for interface libraries" ON)
option(DEPTHAI_VCPKG_INTERNAL_ONLY "Use VCPKG internally, but not for interface libraries" OFF)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick | 🔵 Trivial

Clarify the option help text for maintainability.

Consider making the description explicit about effect (e.g., when enabled, interface deps default to DEPTHAI_*_EXTERNAL=ON via find_package) to avoid future regressions.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@cmake/depthaiOptions.cmake` at line 45, The option
DEPTHAI_VCPKG_INTERNAL_ONLY has an ambiguous help string; update its description
to explicitly state behavior when enabled—e.g., that enabling
DEPTHAI_VCPKG_INTERNAL_ONLY causes interface dependencies to be resolved
externally by default (sets DEPTHAI_*_EXTERNAL=ON semantics) and that
find_package will be used for those interface libs—so future maintainers
understand its effect and interactions with find_package and DEPTHAI_*_EXTERNAL
variables.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

testable PR is ready to be tested

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants