Skip to content

Commit ac923d8

Browse files
authored
Added CMake FetchContent information
1 parent a29ecda commit ac923d8

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,18 @@ depends: [
115115
vcpkg install tomlplusplus
116116
```
117117
118+
### CMake FetchContent
119+
```
120+
include(FetchContent)
121+
FetchContent_Declare(
122+
tomlplusplus
123+
GIT_REPOSITORY https://github.com/marzer/tomlplusplus.git
124+
GIT_TAG 0fcbfbe655917738c39321fcbcbdc7b048a40e33
125+
)
126+
FetchContent_MakeAvailable(tomlplusplus)
127+
```
128+
> ℹ️ _[What is FetchContent?](https://cmake.org/cmake/help/latest/module/FetchContent.html)_
129+
118130
### Other environments and package managers
119131
`toml++` is a fairly new project and I'm not up-to-speed with all of the available packaging and integration options
120132
in the modern C++ ecosystem. I'm also a cmake novice, for better or worse. If there's an integration option missing be

docs/pages/main_page.dox

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -466,6 +466,21 @@
466466
///
467467
//////////////////////////////////
468468
///
469+
/// \subsection mainpage-adding-lib-cmake-fetch-content CMake FetchContent
470+
/// \bash
471+
/// include(FetchContent)
472+
/// FetchContent_Declare(
473+
/// tomlplusplus
474+
/// GIT_REPOSITORY https://github.com/marzer/tomlplusplus.git
475+
/// GIT_TAG 0fcbfbe655917738c39321fcbcbdc7b048a40e33
476+
/// )
477+
/// FetchContent_MakeAvailable(tomlplusplus)
478+
/// \ebash
479+
///
480+
/// \see [What is FetchContent?](https://cmake.org/cmake/help/latest/module/FetchContent.html)
481+
///
482+
//////////////////////////////////
483+
///
469484
/// \subsection mainpage-adding-lib-other Other environments and package managers
470485
/// toml++ is a fairly new project and I'm not up-to-speed with all of the available packaging and integration options
471486
/// in the modern C++ ecosystem. I'm also a cmake novice, for better or worse. If there's an integration option missing

0 commit comments

Comments
 (0)