Skip to content

Commit 2043ead

Browse files
authored
Add using cmake FetchContent to README (#98)
* Add using cmake FetchContent to README * Apply suggestion
1 parent 80940ba commit 2043ead

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,19 @@ add_subdirectory(atomic_queue)
7676
target_link_libraries(main PRIVATE atomic_queue::atomic_queue)
7777
```
7878

79+
## Using cmake FetchContent
80+
You can also use CMake's FetchContent.
81+
```cmake
82+
include(FetchContent)
83+
FetchContent_Declare(
84+
atomic_queue
85+
GIT_REPOSITORY https://github.com/max0x7ba/atomic_queue.git
86+
GIT_TAG master
87+
)
88+
FetchContent_MakeAvailable(atomic_queue)
89+
target_link_libraries(main PRIVATE atomic_queue::atomic_queue)
90+
```
91+
7992
## Install using vcpkg
8093
```
8194
vcpkg install atomic-queue

0 commit comments

Comments
 (0)