Nim icon indicating copy to clipboard operation
Nim copied to clipboard

Add std/pkgconfig module

Open ehmry opened this issue 1 year ago • 3 comments

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 to pkg-config is useful for cross-compiling.

ehmry avatar Oct 17 '24 10:10 ehmry

To be fair this is something that could belong in fusion...

planetis-m avatar Oct 17 '24 11:10 planetis-m

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.

ghost avatar Oct 17 '24 12:10 ghost

Indeed, or a nimble package that could follow a separate release cycle and prove is utility there..

arnetheduck avatar Oct 17 '24 15:10 arnetheduck

I'm still copying this module from project to project and I haven't made any changes to it.

The motivation for having this in std is to encourage people to use pkg-config instead of hardcoding some works-on-my-machine compiler and linker flags. It if was a Nimble package then no one would use it because it takes more time to add another dependency to a project than it does to copypaste whatever compiler flags happen to be working at the moment.

ghost avatar Aug 20 '25 14:08 ghost

Fair enough but can't this assume e.g. "Scoop" on Windows and improve on the status quo (people not caring about Windows...)

Araq avatar Aug 20 '25 16:08 Araq