-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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 std/pkgconfig module #24320
base: devel
Are you sure you want to change the base?
Add std/pkgconfig module #24320
Conversation
To be fair this is something that could belong in fusion... |
If it was something that I would have to fetch an additional package for then I would continue using it as boilerplate to paste into modules. |
|
||
from std/envvars import getEnv | ||
|
||
proc pkgConfig*(args: string): string {.compiletime.} = |
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.
What about cross platform support?
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.
pkg-config doesn't seem to have any flags for cross-compiling.
For cross-compling I would set $PKG_CONFIG_PATH
to somewhere with pkg-config files for your target, which can be done by calling the compiler with putenv:PKG_CONFIG_PATH=your-cross-pkg-config-files
.
Indeed, or a nimble package that could follow a separate release cycle and
prove is utility there..
|
A module for collecting compile-time information from pkg-config.
A module for collecting compile-time information from pkg-config.
I've been using pkg-config with
passC
for years on Linux and it's worked well.Using
$PKG_CONFIG
with a fallback topkg-config
is useful for cross-compiling.