Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
CMake
CMake
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,229
    • Issues 3,229
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 12
    • Merge Requests 12
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • External Wiki
    • External Wiki
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • CMake
  • CMakeCMake
  • Issues
  • #21833

Closed
Open
Opened Feb 18, 2021 by Alexander Neumann@Neumann-AContributor

[feature] Add a vcpkg manifest (vcpkg.json)

So since C++ package managers are becoming a thing and I want an easy way to build cmake (with gui) from a git checkout without having to think about how to provide dependencies like Qt. I especially don't want to use cmake builtin deps if possible.

One way to that is using vcpkg in manifest mode as shown in !5821 (closed)

  • vcpkg is added as a submodule
  • a vcpkg.json is added to define (features/) dependencies
  • vcpkg.cmake from the submodule is provided as a cmake toolchain or included within a custom cmake toolchain -> configure will invoke vcpkg in manifest mode and install the required deps into the build folder /vcpkg_installed -> find_package 'should' simply work for external deps.

Bonus:

  • Add a cmake preset so that building cmake becomes very simple. Could also be used in combination with manifest features to define different types of cmake builds.

Notes:

  • adding vcpkg as a submodule is optional. The benefits are that it fixes the vcpkg version together with the rest and gives a way to define the toolchain in a presets. Versioning in manifest mode could be used instead (https://devblogs.microsoft.com/cppblog/take-control-of-your-vcpkg-dependencies-with-versioning-support/)

The main question is: Is there any interest to have something like that? (The answer for me is yes because it made it trivial to setup VS Code for cmake but others might have a different opinion.)

Edited Feb 18, 2021 by Alexander Neumann
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: cmake/cmake#21833