You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+25
Original file line number
Diff line number
Diff line change
@@ -74,6 +74,7 @@ For a quick overview about the planed features, have a look at the next [Milesto
74
74
75
75
### CMake
76
76
77
+
#### fetch_content:
77
78
If you already have a CMake project you need to integrate C++ Requests with, the primary way is to use `fetch_content`.
78
79
Add the following to your `CMakeLists.txt`.
79
80
@@ -95,6 +96,30 @@ That should do it!
95
96
There's no need to handle `libcurl` yourself. All dependencies are taken care of for you.
96
97
All of this can be found in an example [**here**](https://github.com/libcpr/example-cmake-fetch-content).
97
98
99
+
#### find_package():
100
+
As an alternative to `fetch_content`, it is possible to download, build and install the library and then simply integrate the library to a project via the standard CMake `find-package()` function.
101
+
102
+
**Note:** this feature is feasible only if CPR_USE_SYSTEM_CURL is set. (see [#645](https://github.com/libcpr/cpr/pull/645))
Alternatively, you may install a package specific to your Linux distribution. Since so few distributions currently have a package for cpr, most users will not be able to run your program with this approach.
0 commit comments