fjvallarino/monomer

Consider using pkgconfig-depends when possible

Closed this issue · 3 comments

On systems where GLEW is not present in default folders (/usr/lib, etc), extra-libraries cannot find it, so you should better consider using pkgconfig-depends: glew, when pkg-config is present in system path

Do you have an example of how that would work? It can be a link to another project. I mainly wonder if a pkg-config flag exists that can be checked.

For cabal it’s pkgconfig-depends, as described
here: https://cabal.readthedocs.io/en/3.4/cabal-package.html

I guess, there is a similar option for stack, but I don’t use it

A PR for using pkg-config when available has just been merged. I tested on macOS and Linux and all seems to work fine but, since I have not had issues linking GLEW before, I can't validate it fixes the reported issue.

There is no test for pkg-config being installed because it's one of the pre-requisites for the library (and, mainly, because I don't know if that check can be performed in .cabal files).

I'll close the issue. In case you happen to test this and find problems, don't hesitate to re-open the issue or create a new one. Thanks!