mirror of
https://github.com/red0124/ssp.git
synced 2025-01-23 04:55:20 +01:00
add meson setup to README
This commit is contained in:
parent
cf3469361c
commit
2fa4f8e863
13
README.md
13
README.md
@ -388,13 +388,13 @@ std::cin >> s;
|
|||||||
int num = c.convert<int>(s.c_str());
|
int num = c.convert<int>(s.c_str());
|
||||||
```
|
```
|
||||||
|
|
||||||
# CMake
|
## CMake
|
||||||
|
|
||||||
If you have the repository cloned in your CMake project, simply add it:
|
If the repository is cloned in the CMake project, it can simply be added:
|
||||||
```cmake
|
```cmake
|
||||||
add_subdirectory(ssp)
|
add_subdirectory(ssp)
|
||||||
```
|
```
|
||||||
Othervise, you can fetch just it from the repository:
|
Othervise, it can just be fetched from the repository:
|
||||||
```cmake
|
```cmake
|
||||||
include(FetchContent)
|
include(FetchContent)
|
||||||
FetchContent_Declare(
|
FetchContent_Declare(
|
||||||
@ -409,5 +409,10 @@ Either way, after you prepare the target, you just have to invoke it in your pro
|
|||||||
```cmake
|
```cmake
|
||||||
target_link_libraries(project PUBLIC ssp)
|
target_link_libraries(project PUBLIC ssp)
|
||||||
```
|
```
|
||||||
# Meson
|
## Meson
|
||||||
|
|
||||||
|
Simply fetch the dependency and it is ready to be invoked:
|
||||||
|
```meson
|
||||||
|
ssp_sub = subproject('ssp')
|
||||||
|
ssp_dep = ssp_sub.get_variable('ssp_dep')
|
||||||
|
```
|
||||||
|
Loading…
Reference in New Issue
Block a user