[llvm] [CMake][OCaml] Make OCaml bindings suitable for out-of-tree install (PR #123478)
John Ericson via llvm-commits
llvm-commits at lists.llvm.org
Sun Jan 26 10:39:11 PST 2025
================
@@ -19,8 +19,8 @@ The bindings can also be built out-of-tree, i.e. targeting a preinstalled
LLVM. To do this, configure the LLVM build tree as follows:
$ cmake -DLLVM_OCAML_OUT_OF_TREE=TRUE \
- -DCMAKE_INSTALL_PREFIX=[Preinstalled LLVM path] \
- -DLLVM_OCAML_INSTALL_PATH=[OCaml install prefix] \
+ -DLLVM_OCAML_EXTERNAL_LLVM_LIBDIR=[LLVM libdir, e.g. `llvm-config --libdir`] \
----------------
Ericson2314 wrote:
We shouldn't do this, instead with an `OCAML_BINDINGS_BUILD_STANDALONE` we would do a `findPackage(LLVM ...)`. That in turn would set `LLVM_LIBRARY_DIR` to be the external dir, and we wouldn't need the conditions below.
https://github.com/llvm/llvm-project/pull/123478
More information about the llvm-commits
mailing list