libcpr / cpr

C++ Requests: Curl for People, a spiritual port of Python Requests.
https://docs.libcpr.org/
Other
6.29k stars 903 forks source link

add pkg-config support #1061

Open odek86 opened 3 weeks ago

odek86 commented 3 weeks ago

Is your feature request related to a problem?

please add pkg-config support, so user can use library without cmake. ive trying to add find_package(cpr REQUIRED) on CMakeLists.txt (cpr is installed on /usr/local as prefix ) but cmake couldnt find it. however when i try to built with command g++ -o test test.cpp -lcpr is built with success, but error comes : ./test error while loading shared libraries: libcpr.so.1: cannot open shared object file: No such file or directory

Possible Solution

pkg-config support or , more detailed instruction to use cmake (for noob as me)

Alternatives

No response

Additional Context

No response

COM8 commented 2 weeks ago

Good idea! I Added it to the next major release.

In the meantime you can provide hints to find_package e.g. via find_package(cpr REQUIRED HINTS "/usr/local")