File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,8 @@ let pkg_export =
3535 Printf. sprintf " PKG_CONFIG_PATH=%s" path
3636 | _ -> " "
3737
38+ let split_ws str = List. filter (String. split ~on: ' ' str) ~f: (String. (<> ) " " )
39+
3840let () =
3941 let module C = Configurator in
4042 C. main ~name: " sqlite3" (fun c ->
@@ -46,7 +48,7 @@ let () =
4648 let cmd = pkg_export ^ " pkg-config --cflags sqlite3" in
4749 match read_lines_from_cmd ~max_lines: 1 cmd with
4850 | [cflags] ->
49- let cflags = String. split ~on: ' ' cflags in
51+ let cflags = split_ws cflags in
5052 if
5153 is_macosx ||
5254 try
@@ -60,7 +62,7 @@ let () =
6062 let libs =
6163 let cmd = pkg_export ^ " pkg-config --libs sqlite3" in
6264 match read_lines_from_cmd ~max_lines: 1 cmd with
63- | [libs] -> String. split ~on: ' ' libs
65+ | [libs] -> split_ws libs
6466 | _ -> failwith " pkg-config failed to return libs"
6567 in
6668 let conf = { C.Pkg_config. cflags; libs } in
You can’t perform that action at this time.
0 commit comments