Skip to content

Enable vcpkg manifest features based on CMake options - #42

Open
TrueBrain wants to merge 1 commit into
carbonengine:mainfrom
TrueBrain:use-vcpkg-manifest-features
Open

Enable vcpkg manifest features based on CMake options#42
TrueBrain wants to merge 1 commit into
carbonengine:mainfrom
TrueBrain:use-vcpkg-manifest-features

Conversation

@TrueBrain

@TrueBrain TrueBrain commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Summary

Currently, vcpkg installs all dependencies. Including Python3, even if you don't build the documentation. This is mostly a problem for targets (like Emscripten), that don't allow for building Python3. But this repository doesn't actually need with its default options.

Instead, use vcpkg manifest features like some other repositories already do (like mesh and resources):

  • Set the option()s before project()
  • Fill in VCPKG_MANIFEST_FEATURES

I assumed if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME) was a left-over guard from the migration to GitHub, and actually has no function anymore. Do let me know if that wasn't the case.

AI assistance disclosure

Claude did a lot of triage what if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME) was actually about. Otherwise: none

Type of change

  • Bug fix
  • New feature
  • Refactor / cleanup (no behaviour change)
  • Documentation
  • Build, CI, or tooling
  • Breaking change (public API or ABI)
  • Other (describe below)

Linked issue (optional)

What changed

  • Order of option()
  • vcpkg's manifest, to use features

Testing

$ cmake --preset x64-linux-debug
-- Running vcpkg install
(..)
The following packages will be built and installed:
    gtest:x64-linux-debug@1.17.0#1 -- git+https://github.com/microsoft/vcpkg.git@9ef57e3c1c7484e79ef8dd77e9cb7770f5331248
    lz4:x64-linux-debug@1.10.0 -- git+https://github.com/microsoft/vcpkg.git@4f01eec10f515a428e914107c5188366380f8dd9
  * pthreads:x64-linux-debug@3.0.0#14 -- git+https://github.com/microsoft/vcpkg.git@2e0a6df2800d3677b941dc6504f083965b7886d9
    tracy[core,delayed-init,fibers,manual-lifetime,no-callstack,no-crash-handler,on-demand]:x64-linux-debug@0.13.1#1 -- git+https://github.com/carbonengine/vcpkg-registry.git@f358e08b7d561fd61758b4be66af4dda78cef1eb
  * vcpkg-cmake:x64-linux-debug@2024-04-23 -- git+https://github.com/microsoft/vcpkg.git@e74aa1e8f93278a8e71372f1fa08c3df420eb840
  * vcpkg-cmake-config:x64-linux-debug@2024-05-23 -- git+https://github.com/microsoft/vcpkg.git@97a63e4bc1a17422ffe4eff71da53b4b561a7841

(no more Python3 in default setup)

Platforms tested

  • Windows
  • macOS
  • Linux

Screenshots / captures

Checklist

  • I've read CONTRIBUTING.md.
  • My commits follow the commit-message style described there.
  • I've added or updated tests where it made sense.
  • I've updated docs / inline API comments for any behaviour change.
  • My CLA / ICLA is signed (the bot will let you know if it isn't).

Full disclosure: I am employed by Fenris Creations, although I have no involvement with the Carbon project. I work on this in my free time under my own name.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant