doc: add doc about CPM

This commit is contained in:
ToruNiina
2024-07-23 01:29:13 +09:00
parent 0072e740d5
commit 572781971f
2 changed files with 27 additions and 1 deletions

View File

@@ -114,6 +114,19 @@ add_executable(main main.cpp)
target_link_libraries(main PRIVATE toml11::toml11)
```
### CMake Package Manager (CPM)
[CMake package manager](https://github.com/cpm-cmake/CPM.cmake)を導入すると、以下のようにして使用することができます。
```cmake
include(cmake/CPM.cmake)
CPMAddPackage("gh:ToruNiina/toml11@4.1.0")
add_executable(main main.cpp)
target_link_libraries(main PUBLIC toml11::toml11)
```
### Install using CMake
以下の手順で、CMakeを使ってインストールすることができます。