Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
Added static build instructions for the README.md
  • Loading branch information
Norman-Normandy authored Aug 2, 2024
1 parent 57e263d commit 37fe69d
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,16 @@ cmake .. -DCPR_USE_SYSTEM_CURL=ON
cmake --build . --parallel
sudo cmake --install .
```
#### Build Static Library
As an alternative. If you prefer building the library as static instead of dynamic or shared, simply add the defintion '-DBUILD_SHARED_LIBS=OFF'
```Bash
git clone https://github.com/libcpr/cpr.git
cd cpr && mkdir build && cd build
cmake .. -DCPR_USE_SYSTEM_CURL=ON -DBUILD_SHARED_LIBS=OFF
cmake --build . --parallel
sudo cmake --install .
```

In your `CMakeLists.txt`:
```cmake
find_package(cpr REQUIRED)
Expand Down

0 comments on commit 37fe69d

Please sign in to comment.