Skip to content

Commit 708c9aa

Browse files
authored
Update README.md
1 parent d011f55 commit 708c9aa

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

README.md

+16
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,22 @@ API Documentation: http://wjwwood.github.io/serial/doc/1.1.0/index.html
1515
This fork has replaced the previous build setup in order to successfully build with no extra dependencies.
1616
Build it as any other regular CMake project.
1717

18+
#### Usage with CMake FetchContent
19+
20+
```cmake
21+
set(SERIAL_BUILD_EXAMPLES OFF)
22+
FetchContent_Declare(
23+
serial
24+
GIT_REPOSITORY https://github.com/markaren/serial.git
25+
GIT_TAG <git_tag_or_commit_id>
26+
)
27+
FetchContent_MakeAvailable(serial)
28+
29+
...
30+
31+
target_link_libraries(<target> PRIVATE serial)
32+
```
33+
1834
### License
1935

2036
[The MIT License](LICENSE)

0 commit comments

Comments
 (0)