Passage à dune
This commit is contained in:
4
lib/generator/stubs/libusb_cflags_generator/dune
Normal file
4
lib/generator/stubs/libusb_cflags_generator/dune
Normal file
@ -0,0 +1,4 @@
|
||||
(executable
|
||||
(name libusb_cflags_generator)
|
||||
(libraries dune.configurator)
|
||||
)
|
@ -1,4 +0,0 @@
|
||||
(executable(
|
||||
(name libusb_cflags_generator)
|
||||
(libraries (configurator))
|
||||
))
|
@ -1,11 +1,11 @@
|
||||
let (>>|) a f = match a with None -> None | Some a -> f a
|
||||
|
||||
let libusb_c_flags =
|
||||
let open Configurator in
|
||||
let open Configurator.V1 in
|
||||
create "c"
|
||||
|> Pkg_config.get
|
||||
>>| Pkg_config.query ~package:"libusb-1.0"
|
||||
>>| (fun Pkg_config.{cflags} ->
|
||||
>>| (fun Pkg_config.{cflags;_} ->
|
||||
Some (String.concat " " cflags))
|
||||
|> (function
|
||||
| None -> "libusb flag not found"
|
||||
|
Reference in New Issue
Block a user