Skip to content

Commit

Permalink
Merge pull request ocaml#3855 from dra27/builtin-graphics
Browse files Browse the repository at this point in the history
Detect graphics library for OCaml < 4.09
  • Loading branch information
dra27 authored Oct 7, 2020
2 parents 1894aca + c4f2471 commit 375bf5a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/dune_rules/findlib/meta.ml
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@ let builtins ~stdlib_dir ~version:ocaml_version =
]
}
in
let graphics = simple "graphics" [] ~dir:"+" in
let libs =
let base =
[ stdlib; compiler_libs; str; unix; bigarray; threads; dynlink; bytes ]
Expand All @@ -246,6 +247,12 @@ let builtins ~stdlib_dir ~version:ocaml_version =
else
base
in
let base =
if Path.exists (Path.relative stdlib_dir "graphics.cma") then
graphics :: base
else
base
in
(* We do not rely on an "exists_if" ocamlfind variable, because it would
produce an error message mentioning a "hidden" package (which could be
confusing). *)
Expand Down

0 comments on commit 375bf5a

Please sign in to comment.