-
Notifications
You must be signed in to change notification settings - Fork 181
Add pkg-config support #319
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
Conversation
d89342f to
a3a98ca
Compare
|
@emil-e it would be good to merge this because we want to use it in Nixpkgs and for Nix. |
|
Thanks! |
| set(PKG_CONFIG_VERSION) | ||
| set(PKG_CONFIG_LIBDIR "\${prefix}/lib") | ||
| set(PKG_CONFIG_INCLUDEDIR "\${prefix}/include") | ||
| set(PKG_CONFIG_LIBS) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is PKG_CONFIG_LIBS intentionally empty?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes I think so, otherwise it won't be replaced or will be a warning/error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure this is correct. rapidcheck ships a librapidcheck.so file which doesn't get picked up with --libs because this is empty
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the correct value for PKG_CONFIG_LIBS should be "-L\${libdir} -lrapidcheck"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh nevermind that's not correct. @octurion is right. Sorry!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR adds pkg-config support. For every activated extra header lib, it creates an additional pkg-config file.
This way users can run pkg-config on suffixed packages to find out if that feature exists: