Skip to content
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

Open
odek86 opened this issue Jun 6, 2024 · 2 comments
Open

add pkg-config support #1061

odek86 opened this issue Jun 6, 2024 · 2 comments

Comments

@odek86
Copy link

odek86 commented Jun 6, 2024

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
Copy link
Member

COM8 commented Jun 8, 2024

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")

@guylevy84
Copy link
Contributor

guylevy84 commented Jul 3, 2024

Regarding find_package(cpr REQUIRED) failure, I think that find_packge() section in the README includes the instructions that you need for CMake usage

https://github.com/libcpr/cpr?tab=readme-ov-file#find_package

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants