Skip to content

Commit

Permalink
[OCaml] [cmake] Use LLVM_LIBRARY_DIR instead of LLVM_LIBRARY_OUTPUT_I…
Browse files Browse the repository at this point in the history
…NTDIR.

The latter variable is internal.

Original patch by Ramkumar Ramachandra <[email protected]>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224977 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
whitequark committed Dec 30, 2014
1 parent f8207ac commit a2cb627
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions bindings/ocaml/backends/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ foreach(TARGET ${LLVM_TARGETS_TO_BUILD})

configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/META.llvm_backend.in"
"${LLVM_LIBRARY_OUTPUT_INTDIR}/ocaml/META.llvm_${TARGET}")
"${LLVM_LIBRARY_DIR}/ocaml/META.llvm_${TARGET}")

install(FILES "${LLVM_LIBRARY_OUTPUT_INTDIR}/ocaml/META.llvm_${TARGET}"
install(FILES "${LLVM_LIBRARY_DIR}/ocaml/META.llvm_${TARGET}"
DESTINATION lib/ocaml)
endforeach()
4 changes: 2 additions & 2 deletions bindings/ocaml/llvm/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ add_ocaml_library(llvm

configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/META.llvm.in"
"${LLVM_LIBRARY_OUTPUT_INTDIR}/ocaml/META.llvm")
"${LLVM_LIBRARY_DIR}/ocaml/META.llvm")

install(FILES "${LLVM_LIBRARY_OUTPUT_INTDIR}/ocaml/META.llvm"
install(FILES "${LLVM_LIBRARY_DIR}/ocaml/META.llvm"
DESTINATION lib/ocaml)
6 changes: 3 additions & 3 deletions cmake/modules/AddOCaml.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ function(add_ocaml_library name)
"${bin}/${name}${CMAKE_STATIC_LIBRARY_SUFFIX}")
endif()

set(ocaml_flags "-lstdc++" "-ldopt" "-L${LLVM_LIBRARY_OUTPUT_INTDIR}"
set(ocaml_flags "-lstdc++" "-ldopt" "-L${LLVM_LIBRARY_DIR}"
${ocaml_pkgs})

foreach( ocaml_dep ${ARG_OCAMLDEP} )
Expand Down Expand Up @@ -144,7 +144,7 @@ function(add_ocaml_library name)
OUTPUT "${bin}/${name}.odoc"
COMMAND "${OCAMLFIND}" "ocamldoc"
"-I" "${bin}"
"-I" "${LLVM_LIBRARY_OUTPUT_INTDIR}/ocaml/"
"-I" "${LLVM_LIBRARY_DIR}/ocaml/"
"-dump" "${bin}/${name}.odoc"
${ocaml_pkgs} ${ocaml_inputs}
DEPENDS ${ocaml_inputs}
Expand Down Expand Up @@ -192,7 +192,7 @@ function(add_ocaml_library name)
get_filename_component(filename "${install_file}" NAME)
add_custom_command(TARGET "ocaml_${name}" POST_BUILD
COMMAND "${CMAKE_COMMAND}" "-E" "copy" "${install_file}"
"${LLVM_LIBRARY_OUTPUT_INTDIR}/ocaml/"
"${LLVM_LIBRARY_DIR}/ocaml/"
COMMENT "Copying OCaml library component ${filename} to intermediate area"
VERBATIM)
endforeach()
Expand Down

0 comments on commit a2cb627

Please sign in to comment.