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