GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - build-cpp/vcpkg_template: Simple cmkr template to get you started with vcpkg right away.

BranchesTags
Open more actions menu

Latest commit

 

History

27 Commits
27 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
src
src
 
 
vcpkg-overlay
vcpkg-overlay
 
 
.gitignore
.gitignore
 
 
CMakeLists.txt
CMakeLists.txt
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
cmake.toml
cmake.toml
 
 
cmkr.cmake
cmkr.cmake
 
 
vcpkg.json
vcpkg.json
 
 

Repository files navigation

vcpkg_template

This is a template showcasing cmkr together with vcpkg for frictionless cross platform dependency management with CMake.

Building

Use the following commands to build the project:

cmake -B build
cmake --build build

cmake.toml

Under the hood cmkr generates the CMakeLists.txt required to build this project from the cmake.toml file:

[project]
name = "vcpkg_template"

# See https://vcpkg.link for available packages
# Chose a version from https://github.com/microsoft/vcpkg/releases
[vcpkg]
version = "2024.11.16"
packages = [
    "fmt",
    # disable default features (core) and enable DBSTAT virtual table (dbstat)
    "sqlite3[core,dbstat]",
    "mylib",
]
overlay = "vcpkg-overlay"

# Make the packages available to CMake
[find-package.fmt]
[find-package.unofficial-sqlite3]
[find-package.unofficial-mylib]

[target.example]
type = "executable"
sources = ["src/main.cpp"]
link-libraries = [
    "fmt::fmt",
    "unofficial::sqlite3::sqlite3",
    "unofficial::mylib::mylib",
]

Vcpkg overlay

The [vcpkg].overlay key points to a local folder used as an overlay for vcpkg ports and triplets:

vcpkg-overlay
├── mylib              # custom port
│   ├── CMakeLists.txt
│   ├── portfile.cmake
│   ├── usage
│   └── vcpkg.json
└── x64-windows.cmake  # custom triplet

The vcpkg-overlay/mylib overlay port is used to make the example mylib available without having to fork the vcpkg repository or create a custom registry.

The vcpkg-overlay/x64-windows.cmake overlay triplet is used to always build static libraries for Windows (instead of shared libraries, which is normally the default).

About

Simple cmkr template to get you started with vcpkg right away.

Topics

cmakecmkrcppidetemplatevcpkgvcpkg-template

Resources

Readme
BSL-1.0 license
Activity
Custom properties

Stars

11 stars

Watchers

2 watching

Forks

3 forks
Report repository

Used by

Contributors

Languages

You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.