Added CMake FetchContent + tar archive downloading (#103)

This commit is contained in:
Evgeny Proydakov 2021-05-21 11:14:05 +03:00 committed by GitHub
parent a9262c672f
commit 7bf8c03f7a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 24 additions and 0 deletions

View File

@ -114,6 +114,17 @@ vcpkg install tomlplusplus
```
### CMake FetchContent
Using the tar archive
```
include(FetchContent)
FetchContent_Declare(
tomlplusplus
URL https://github.com/marzer/tomlplusplus/archive/refs/tags/v2.4.0.tar.gz
URL_HASH MD5=546d163e5f37d9bbdc5e19702aaaac8f
)
FetchContent_MakeAvailable(tomlplusplus)
```
Using the git tag
```
include(FetchContent)
FetchContent_Declare(

View File

@ -455,6 +455,19 @@
//////////////////////////////////
///
/// \subsection mainpage-adding-lib-cmake-fetch-content CMake FetchContent
///
/// Using the tar archive
/// \bash
/// include(FetchContent)
/// FetchContent_Declare(
/// tomlplusplus
/// URL https://github.com/marzer/tomlplusplus/archive/refs/tags/v2.4.0.tar.gz
/// URL_HASH MD5=546d163e5f37d9bbdc5e19702aaaac8f
/// )
/// FetchContent_MakeAvailable(tomlplusplus)
/// \ebash
///
/// Using the git tag
/// \bash
/// include(FetchContent)
/// FetchContent_Declare(