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

Link libraries using pkg-config pragma #320

Open
kenfred opened this issue Nov 7, 2019 · 0 comments
Open

Link libraries using pkg-config pragma #320

kenfred opened this issue Nov 7, 2019 · 0 comments

Comments

@kenfred
Copy link

kenfred commented Nov 7, 2019

Hello! I find the existing methods for loading third-party libraries to be a bit verbose and tightly coupled to the file system. I would like to propose a new pragma that allows dependencies to be linked using pkg-config. It would be something like:

#pragma cling pkg-config(libname)

This picks up the include directories, lib directories, lib names, other flags, etc. in a single pragma. Also, it doesn't have any hardcoded paths. As long as PKG_CONFIG_PATH is defined in the environment where the .pc files are found, everything will be found.

My inspiration for this is how cgo uses comment magic to link dependencies with pkg-config.

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

1 participant