Index: bindings/ocaml/CMakeLists.txt =================================================================== --- bindings/ocaml/CMakeLists.txt +++ bindings/ocaml/CMakeLists.txt @@ -1,3 +1,6 @@ +set(LLVM_OCAML_INSTALL_PATH "${OCAML_STDLIB_PATH}/llvm" CACHE STRING + "Install directory for LLVM Ocaml libraries") + add_subdirectory(llvm) add_subdirectory(all_backends) add_subdirectory(analysis) 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() 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: 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}") 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}") foreach( install_file ${install_files} ${install_shlibs} ) get_filename_component(filename "${install_file}" NAME)