Skip to content

Commit

Permalink
Adapt dll stub library for windows #98 #96.
Browse files Browse the repository at this point in the history
  • Loading branch information
dbuenzli committed Sep 11, 2024
1 parent 0c9a3c9 commit 1460567
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion myocamlbuild.ml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@ let lib_with_clib ~lib ~clib ~has_lib ~src_dir ~stublib =
let record_stub_lib = strf "record_%s" stublib in
let link_stub_archive = strf "link_%s_archive" stublib in
let stub_ar = ar (strf "%s/lib%s" src_dir stublib) in
let stub_l = A (strf "-l%s" stublib) in
let stub_l = match !Ocamlbuild_plugin.Options.ext_lib with
| "lib" (* Windows *) -> [A (Printf.sprintf "dll%s.dll" stublib)]
| _ -> [A (Printf.sprintf "-l%s" stublib)]
in
let clib_l = pkg_config "libs-only-l" clib in
let clib_L = pkg_config "libs-only-L" clib in
let clib_cflags = ccopts @@ (A has_lib) :: pkg_config "cflags" clib in
Expand Down

0 comments on commit 1460567

Please sign in to comment.