[PATCH] D24354: cmake: Install the OCaml libraries into a more correct path

Michał Górny via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 9 03:29:06 PDT 2016


mgorny updated this revision to Diff 70808.

https://reviews.llvm.org/D24354

Files:
  bindings/ocaml/backends/CMakeLists.txt
  bindings/ocaml/backends/META.llvm_backend.in
  bindings/ocaml/llvm/CMakeLists.txt
  bindings/ocaml/llvm/META.llvm.in
  cmake/config-ix.cmake
  cmake/modules/AddOCaml.cmake

Index: cmake/modules/AddOCaml.cmake
===================================================================
--- cmake/modules/AddOCaml.cmake
+++ cmake/modules/AddOCaml.cmake
@@ -193,12 +193,12 @@
   endforeach()
 
   install(FILES ${install_files}
-          DESTINATION lib/ocaml)
+          DESTINATION "${LLVM_OCAML_INSTALL_PATH}/llvm")
   install(FILES ${install_shlibs}
           PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE
                       GROUP_READ GROUP_EXECUTE
                       WORLD_READ WORLD_EXECUTE
-          DESTINATION lib/ocaml)
+          DESTINATION "${LLVM_OCAML_INSTALL_PATH}/llvm")
 
   foreach( install_file ${install_files} ${install_shlibs} )
     get_filename_component(filename "${install_file}" NAME)
Index: cmake/config-ix.cmake
===================================================================
--- cmake/config-ix.cmake
+++ cmake/config-ix.cmake
@@ -576,6 +576,9 @@
         message(STATUS "OCaml bindings enabled.")
         find_ocamlfind_package(oUnit VERSION 2 OPTIONAL)
         set(LLVM_BINDINGS "${LLVM_BINDINGS} ocaml")
+
+        set(LLVM_OCAML_INSTALL_PATH "${OCAML_STDLIB_PATH}" CACHE STRING
+            "Install directory for LLVM OCaml packages")
       else()
         message(STATUS "OCaml bindings disabled, need ctypes >=0.4.")
       endif()
Index: bindings/ocaml/llvm/META.llvm.in
===================================================================
--- bindings/ocaml/llvm/META.llvm.in
+++ bindings/ocaml/llvm/META.llvm.in
@@ -3,7 +3,7 @@
 description = "LLVM OCaml bindings"
 archive(byte) = "llvm.cma"
 archive(native) = "llvm.cmxa"
-directory = "."
+directory = "llvm"
 
 package "analysis" (
     requires = "llvm"
Index: bindings/ocaml/llvm/CMakeLists.txt
===================================================================
--- bindings/ocaml/llvm/CMakeLists.txt
+++ bindings/ocaml/llvm/CMakeLists.txt
@@ -8,4 +8,4 @@
   "${LLVM_LIBRARY_DIR}/ocaml/META.llvm")
 
 install(FILES "${LLVM_LIBRARY_DIR}/ocaml/META.llvm"
-        DESTINATION lib/ocaml)
+        DESTINATION "${LLVM_OCAML_INSTALL_PATH}")
Index: bindings/ocaml/backends/META.llvm_backend.in
===================================================================
--- bindings/ocaml/backends/META.llvm_backend.in
+++ bindings/ocaml/backends/META.llvm_backend.in
@@ -4,4 +4,4 @@
 requires = "llvm"
 archive(byte) = "llvm_ at TARGET@.cma"
 archive(native) = "llvm_ at TARGET@.cmxa"
-directory = "."
+directory = "llvm"
Index: bindings/ocaml/backends/CMakeLists.txt
===================================================================
--- bindings/ocaml/backends/CMakeLists.txt
+++ bindings/ocaml/backends/CMakeLists.txt
@@ -23,5 +23,5 @@
     "${LLVM_LIBRARY_DIR}/ocaml/META.llvm_${TARGET}")
 
   install(FILES "${LLVM_LIBRARY_DIR}/ocaml/META.llvm_${TARGET}"
-          DESTINATION lib/ocaml)
+          DESTINATION "${LLVM_OCAML_INSTALL_PATH}")
 endforeach()


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D24354.70808.patch
Type: text/x-patch
Size: 2877 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160909/166fee1f/attachment.bin>


More information about the llvm-commits mailing list