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

Proposal to do native deps using pkg-config #26

Closed
o11c opened this issue Jun 20, 2014 · 1 comment
Closed

Proposal to do native deps using pkg-config #26

o11c opened this issue Jun 20, 2014 · 1 comment

Comments

@o11c
Copy link
Contributor

o11c commented Jun 20, 2014

On Linux, the state-of-the-art mechanism for linking to native libraries is pkg-config, replacing decades of hard-coding. On other platforms, there is no solution easier than using pkg-config, although it is most likely not installed by default there.

pkg-config supports both static and dynamic linking, although there are a lot of in-the-wild .pc files that don't support static linking properly.

Here's an example of using pkg-config in a (currently non-Cargo) Rust project, including the "rpath" step for libraries installed in non-system directories: https://github.com/o11c/termkey-rs/blob/master/Makefile

@wycats
Copy link
Contributor

wycats commented Jun 21, 2014

Can you use the build = configuration in the Cargo.toml to use pkg-config?

@wycats wycats closed this as completed Jun 23, 2014
ehuss pushed a commit to ehuss/cargo that referenced this issue Nov 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants