Skip to content

Commit fb9be5c

Browse files
committed
Add how to install guide (incomplete)
1 parent c84bf55 commit fb9be5c

File tree

1 file changed

+34
-1
lines changed

1 file changed

+34
-1
lines changed

docs/+current/index.md

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,37 @@ author: RSP Systems A/S
1717

1818
## How to install
1919

20-
_TODO: ...incomplete, please review documentation at a later point_
20+
### Via CPM
21+
22+
If you are using [CPM](https://github.com/cpm-cmake/CPM.cmake), then you can install "CMake Scripts" using the following:
23+
24+
```cmake
25+
set(RSP_CMAKE_SCRIPTS_VERSION "0.1.0")
26+
27+
CPMAddPackage(
28+
NAME "rsp-cmake-scripts"
29+
GIT_TAG "${RSP_CMAKE_SCRIPTS_VERSION}"
30+
GITHUB_REPOSITORY "rsps/cmake-scripts"
31+
)
32+
```
33+
34+
### Via Fetch Content
35+
36+
Alternatively, you can also use cmake's [`FetchContent`](https://cmake.org/cmake/help/latest/module/FetchContent.html) module:
37+
38+
```cmake
39+
set(RSP_CMAKE_SCRIPTS_VERSION "0.1.0")
40+
41+
include(FetchContent)
42+
FetchContent_Declare(
43+
rsp-cmake-scripts
44+
GIT_REPOSITORY https://github.com/rsps/cmake-scripts
45+
GIT_TAG ${RSP_CMAKE_SCRIPTS_VERSION}
46+
FIND_PACKAGE_ARGS NAMES rsp-cmake-scripts
47+
)
48+
FetchContent_MakeAvailable(rsp-cmake-scripts)
49+
```
50+
51+
!!! note "Note"
52+
"CMake Scripts" depends on [CPM](https://github.com/cpm-cmake/CPM.cmake) for its dependencies. It will
53+
automatically be included, even when you install this project using cmake's `FetchContent` module.

0 commit comments

Comments
 (0)