mirror of
https://github.com/cpm-cmake/CPM.cmake.git
synced 2025-11-21 19:57:24 -05:00
Update README.md
This commit is contained in:
19
README.md
19
README.md
@@ -83,6 +83,8 @@ CPMAddPackage(
|
|||||||
)
|
)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
See [here](https://github.com/TheLartians/CPM/blob/master/examples/doctest/CMakeLists.txt) for doctest example.
|
||||||
|
|
||||||
### [google/benchmark](https://github.com/google/benchmark.git)
|
### [google/benchmark](https://github.com/google/benchmark.git)
|
||||||
|
|
||||||
Has a CMakeLists.txt that supports `add_subdirectory`, but needs some configuring to work without external dependencies.
|
Has a CMakeLists.txt that supports `add_subdirectory`, but needs some configuring to work without external dependencies.
|
||||||
@@ -100,20 +102,21 @@ CPMAddPackage(
|
|||||||
set_target_properties(benchmark PROPERTIES CXX_STANDARD 17)
|
set_target_properties(benchmark PROPERTIES CXX_STANDARD 17)
|
||||||
```
|
```
|
||||||
|
|
||||||
### [Simple match](https://github.com/jbandela/simple_match.git)
|
### [nlohmann/json](https://github.com/nlohmann/json)
|
||||||
|
|
||||||
Header-only library without releases or CMakeLists.txt, target must be created manually.
|
Header-only library with a huge git repositoy.
|
||||||
|
Instead of downloading the whole repositoy, we fetch the zip included with the release and create our own target.
|
||||||
|
|
||||||
```cmake
|
```cmake
|
||||||
CPMAddPackage(
|
CPMAddPackage(
|
||||||
NAME simple_match
|
NAME nlohmann_json
|
||||||
GIT_REPOSITORY https://github.com/jbandela/simple_match.git
|
VERSION 3.6.1
|
||||||
GIT_TAG a3ab17f3d98db302de68ad85ed399a42ae41889e
|
URL https://github.com/nlohmann/json/releases/download/v3.6.1/include.zip
|
||||||
DOWNLOAD_ONLY True
|
URL_HASH SHA256=69cc88207ce91347ea530b227ff0776db82dcb8de6704e1a3d74f4841bc651cf
|
||||||
)
|
)
|
||||||
|
|
||||||
add_library(simple_match INTERFACE IMPORTED)
|
add_library(nlohmann_json INTERFACE)
|
||||||
target_include_directories(simple_match INTERFACE "${simple_match_SOURCE_DIR}/include")
|
target_include_directories(nlohmann_json INTERFACE ${nlohmann_json_SOURCE_DIR})
|
||||||
```
|
```
|
||||||
|
|
||||||
### [Lua](https://www.lua.org)
|
### [Lua](https://www.lua.org)
|
||||||
|
|||||||
Reference in New Issue
Block a user