2014-02-10 00:35:29 +08:00
|
|
|
set(LLVM_INSTALL_PACKAGE_DIR share/llvm/cmake)
|
|
|
|
set(llvm_cmake_builddir "${LLVM_BINARY_DIR}/${LLVM_INSTALL_PACKAGE_DIR}")
|
2011-04-11 00:17:49 +08:00
|
|
|
set(LLVM_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX})
|
2010-08-09 11:26:43 +08:00
|
|
|
|
2011-02-19 06:06:14 +08:00
|
|
|
get_property(llvm_libs GLOBAL PROPERTY LLVM_LIBS)
|
|
|
|
|
2011-07-30 07:52:01 +08:00
|
|
|
foreach(lib ${llvm_libs})
|
2011-11-29 09:31:52 +08:00
|
|
|
get_property(llvm_lib_deps GLOBAL PROPERTY LLVMBUILD_LIB_DEPS_${lib})
|
2011-07-30 07:52:01 +08:00
|
|
|
set(all_llvm_lib_deps
|
2011-11-29 09:31:52 +08:00
|
|
|
"${all_llvm_lib_deps}\nset_property(GLOBAL PROPERTY LLVMBUILD_LIB_DEPS_${lib} ${llvm_lib_deps})")
|
2011-07-30 07:52:01 +08:00
|
|
|
endforeach(lib)
|
|
|
|
|
2010-08-09 11:26:43 +08:00
|
|
|
configure_file(
|
2011-04-11 00:17:49 +08:00
|
|
|
LLVMConfig.cmake.in
|
|
|
|
${llvm_cmake_builddir}/LLVMConfig.cmake
|
|
|
|
@ONLY)
|
|
|
|
|
|
|
|
configure_file(
|
|
|
|
LLVMConfigVersion.cmake.in
|
|
|
|
${llvm_cmake_builddir}/LLVMConfigVersion.cmake
|
2010-09-14 07:59:48 +08:00
|
|
|
@ONLY)
|
2010-08-09 11:26:43 +08:00
|
|
|
|
2013-08-24 08:20:36 +08:00
|
|
|
if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
|
|
|
|
install(FILES
|
|
|
|
${llvm_cmake_builddir}/LLVMConfig.cmake
|
|
|
|
${llvm_cmake_builddir}/LLVMConfigVersion.cmake
|
|
|
|
LLVM-Config.cmake
|
2014-02-10 00:35:29 +08:00
|
|
|
DESTINATION ${LLVM_INSTALL_PACKAGE_DIR})
|
2011-02-04 04:57:36 +08:00
|
|
|
|
2013-08-24 08:20:36 +08:00
|
|
|
install(DIRECTORY .
|
2014-02-10 00:35:29 +08:00
|
|
|
DESTINATION ${LLVM_INSTALL_PACKAGE_DIR}
|
2013-08-24 08:20:36 +08:00
|
|
|
FILES_MATCHING PATTERN *.cmake
|
|
|
|
PATTERN .svn EXCLUDE
|
|
|
|
PATTERN LLVMConfig.cmake EXCLUDE
|
|
|
|
PATTERN LLVMConfigVersion.cmake EXCLUDE
|
|
|
|
PATTERN LLVM-Config.cmake EXCLUDE
|
|
|
|
PATTERN GetHostTriple.cmake EXCLUDE
|
|
|
|
PATTERN VersionFromVCS.cmake EXCLUDE
|
|
|
|
PATTERN CheckAtomic.cmake EXCLUDE)
|
|
|
|
endif()
|