Files
build-cpp-cmkr/docs/examples/fetch-content.md
T
2021-05-16 22:55:55 +02:00

878 B

layout, title, permalink, parent, nav_order
layout title permalink parent nav_order
default Fetching from git /examples/fetch-content Examples 2

Fetching from git

Downloads fmt v7.1.3 from GitHub and links an example target to it:

[project]
name = "fetch-content"
description = "Fetching from git"

[fetch-content]
fmt = { git = "https://github.com/fmtlib/fmt", tag = "7.1.3" }

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

This is equivalent to calling CMake's FetchContent.

This page was automatically generated from tests/fetch-content/cmake.toml.