Update configurator to use dune syntax
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
This commit is contained in:
parent
f5ed6586d5
commit
a04f77dca1
|
@ -63,12 +63,12 @@ invoke it as an executable and tell dune about the targets that it produces:
|
||||||
.. code-block:: lisp
|
.. code-block:: lisp
|
||||||
|
|
||||||
(executable
|
(executable
|
||||||
((name discover)
|
(name discover)
|
||||||
(libraries (dune.configurator))))
|
(libraries dune.configurator))
|
||||||
|
|
||||||
(rule
|
(rule
|
||||||
((targets (config.h))
|
(targets config.h)
|
||||||
(action (run ./discover.exe))))
|
(action (run ./discover.exe)))
|
||||||
|
|
||||||
Another common pattern is to produce a flags file with configurator and then use
|
Another common pattern is to produce a flags file with configurator and then use
|
||||||
this flag file using ``:include``:
|
this flag file using ``:include``:
|
||||||
|
@ -76,9 +76,9 @@ this flag file using ``:include``:
|
||||||
.. code-block:: lisp
|
.. code-block:: lisp
|
||||||
|
|
||||||
(library
|
(library
|
||||||
((name mylib)
|
(name mylib)
|
||||||
(c_names (foo))
|
(c_names foo)
|
||||||
(c_library_flags (:include (flags.sexp)))))
|
(c_library_flags (:include (flags.sexp))))
|
||||||
|
|
||||||
For this, generate the list of flags for your library — for example
|
For this, generate the list of flags for your library — for example
|
||||||
using ``Configurator.V1.Pkg_config`` — and then write them to a file,
|
using ``Configurator.V1.Pkg_config`` — and then write them to a file,
|
||||||
|
|
Loading…
Reference in New Issue