Skip to content

Commit 1146502

Browse files
authored
docs: document add_subdirectory usage
1 parent ce150dc commit 1146502

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,23 @@ Examples can be built with the provided scripts:
7979

8080
Use `install_mql5.bat` to install the MQL5 files.
8181

82+
## Submodule / add_subdirectory
83+
84+
To vendor the library, add it as a Git submodule:
85+
86+
```sh
87+
git submodule add https://github.com/NewYaroslav/time-shield-cpp external/time-shield-cpp
88+
```
89+
90+
Then include it in your project with CMake:
91+
92+
```cmake
93+
add_subdirectory(external/time-shield-cpp)
94+
95+
add_executable(app main.cpp)
96+
target_link_libraries(app PRIVATE time_shield::time_shield)
97+
```
98+
8299
## Usage Examples
83100

84101
Below are small examples from different sections of the library.

0 commit comments

Comments
 (0)