diff --git a/doc/quick-start.rst b/doc/quick-start.rst index 1fcad89b..de6e63f8 100644 --- a/doc/quick-start.rst +++ b/doc/quick-start.rst @@ -207,29 +207,29 @@ as well as this ``discover.ml`` file: .. code:: ocaml - open Base - open Stdio - module C = Configurator - let write_sexp fn sexp = - Out_channel.write_all fn ~data:(Sexp.to_string sexp) + module C = Configurator.V1 let () = - C.main ~name:"mylib" (fun c -> - let default : C.Pkg_config.package_conf = - { libs = ["-lblah"] - ; cflags = [] - } - in - let conf = - match C.Pkg_config.get c with - | None -> default - | Some pc -> - Option.value (C.Pkg_config.query pc ~package:"blah") ~default - in + C.main ~name:"foo" (fun c -> + let default : C.Pkg_config.package_conf = + { libs = ["-lgst-editing-services-1.0"] + ; cflags = [] + } + in + let conf = + match C.Pkg_config.get c with + | None -> default + | Some pc -> + match (C.Pkg_config.query pc ~package:"gst-editing-services-1.0") with + | None -> default + | Some deps -> deps + in + + + C.Flags.write_sexp "c_flags.sexp" conf.cflags; + C.Flags.write_sexp "c_library_flags.sexp" conf.libs) - write_sexp "c_flags.sexp" (sexp_of_list sexp_of_string conf.cflags); - write_sexp "c_library_flags.sexp" (sexp_of_list sexp_of_string conf.libs)) Using a custom code generator =============================