Open ejgallego opened 5 years ago
I like the feature, but I'm not sure we should have a field like "pkg-config". A field like (c_libraries ..)
should be sufficient in my opinion. The version querying scheme if supported could be generalized to OCaml libraries as well by the way.
c_libraries
could indeed work, what should happen if pkg config is not available tho?
I actually thought about querying ocaml libs, but I am not sure what the version story is here, right? It looks like that should be sorted first in dune?
c_libraries could indeed work, what should happen if pkg config is not available tho?
Just fail. Eventually, I think it would be desirable to implement pkg-config in dune itself. It's far simpler than ocamlfind actually.
I actually thought about querying ocaml libs, but I am not sure what the version story is here, right? It looks like that should be sorted first in dune?
What's the difference? Every OCaml library has a version. Yes, there's no standard for the versions but we can use the same comparison that opam uses.
Some recent information about the status of pkg-config on cygwin: https://github.com/coq/coq/issues/9760
As suggested in https://github.com/ocaml/dune/pull/1886 , adding a field for automatically importing
pkg_config
build flags could be convenient and save quite a few boilerplate for C users.The idea would be to have a new feature:
which would extend the
(library ...)
stanza to add a field:Such field should unsugar to something similar to:
where
dune_config
is the straightforward call to configurator [that could be embedded by dune avoiding the.exe
and intermediate file of course]