Fix DEPTHAI_VCPKG_INTERNAL_ONLY option#1741
Conversation
📝 WalkthroughWalkthroughThe default for the CMake option Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
ac743e3 to
fc291ff
Compare
There was a problem hiding this comment.
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
📒 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) |
There was a problem hiding this comment.
🧹 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.
Purpose
The
DEPTHAI_VCPKG_INTERNAL_ONLYoption had behaviour opposite to its description. I have corrected this behaviour and changed the default value toOFF.Specification
None / not applicable
Dependencies & Potential Impact
None / not applicable
Deployment Plan
None / not applicable
Testing & Validation
None / not applicable
Summary by CodeRabbit