-
Notifications
You must be signed in to change notification settings - Fork 947
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add pkg-config support #1061
Comments
Good idea! I Added it to the next major release. In the meantime you can provide hints to |
Regarding https://github.com/libcpr/cpr?tab=readme-ov-file#find_package |
Hey, is this issue open, and if so can I work on it for Hacktoberfest? |
Yes, it's still open. You are more than welcome to work on it. I added the "Hacktoberfest" tag. |
So here's my Idea for this so far, I'd like to create a template for the .pc file and fill it in with configure_file. I have a few questions about how some of the libraries are linked though. From what I can tell, all the dependencies (SSL, libz and libcurl) are linked statically to libcpr, since I've been able to compile and link a test program by just linking it against libcpr.so. Is there something I'm missing? Are there any build flags which force CMake to link again OpenSSL or libcurl dynamically (hence requiring an entry in the .pc file)? If so, I plan on modifying CMakeLists.txt to append these libraries to a variable, and use this variable in the call to configure_file. Please let me know if this approach works or if you have any suggested alternatives. |
Two request I would have from my side:
|
Is your feature request related to a problem?
please add
pkg-config
support, so user can use library withoutcmake
.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 usecmake
(for noob as me)Alternatives
No response
Additional Context
No response
The text was updated successfully, but these errors were encountered: