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

cmake: libcurl.pc uses absolute library paths #6169

Closed
reddwarf69 opened this issue Nov 4, 2020 · 1 comment
Closed

cmake: libcurl.pc uses absolute library paths #6169

reddwarf69 opened this issue Nov 4, 2020 · 1 comment

Comments

@reddwarf69
Copy link
Contributor

The libcurl.pc file generated by cmake contains things like Libs.private: /usr/lib64/libssl.so /usr/lib64/libcrypto.so /usr/lib64/libz.so. The autotools equivalent would say Libs.private: -lssl -lcrypto -lz.

Not sure of the implications. But I guess it would affect, for example, somebody who wants to use also a static version of libz.

@reddwarf69
Copy link
Contributor Author

reddwarf69 commented Nov 4, 2020

FWIW I am personally using https://github.com/RedDwarf69/curl/tree/cmake. I'm not creating PRs because I have not tried to make it ready for that (e.g I'm increasing the minimum required cmake version... and I have no idea how much you want to keep cmake 3.2 support).
I'm solving this with reddwarf69@291e6ee

@bagder bagder added the cmake label Nov 4, 2020
@bagder bagder closed this as completed in 1920993 Nov 18, 2020
levitte added a commit to levitte/curl that referenced this issue Mar 6, 2024
Letting CMake figure out where libraries are located gives you full paths.
When generating libcurl.pc and curl-config, getting libraries as full paths
is unusual when one expects to get a list of -l<libname>.

To meet expectations, an effort is made to convert the full paths into
-l<libname>, possibly with -L<libdir> before it.

Fixes curl#6169
Fixes curl#12748
bagder pushed a commit that referenced this issue Mar 7, 2024
Letting CMake figure out where libraries are located gives you full
paths. When generating libcurl.pc and curl-config, getting libraries as
full paths is unusual when one expects to get a list of -l<libname>.

To meet expectations, an effort is made to convert the full paths into
-l<libname>, possibly with -L<libdir> before it.

Fixes #6169
Fixes #12748
Closes #12930
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

2 participants