mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-31 10:34:17 +00:00
5534cb3f57
Use a LLVM_INSTALL_PACKAGE_DIR variable to hold the path and reference it where necessary. Contributed by Brad King. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201046 91177308-0d34-0410-b5e6-96231b3b80d8
41 lines
1.2 KiB
CMake
41 lines
1.2 KiB
CMake
set(LLVM_INSTALL_PACKAGE_DIR share/llvm/cmake)
|
|
set(llvm_cmake_builddir "${LLVM_BINARY_DIR}/${LLVM_INSTALL_PACKAGE_DIR}")
|
|
set(LLVM_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX})
|
|
|
|
get_property(llvm_libs GLOBAL PROPERTY LLVM_LIBS)
|
|
|
|
foreach(lib ${llvm_libs})
|
|
get_property(llvm_lib_deps GLOBAL PROPERTY LLVMBUILD_LIB_DEPS_${lib})
|
|
set(all_llvm_lib_deps
|
|
"${all_llvm_lib_deps}\nset_property(GLOBAL PROPERTY LLVMBUILD_LIB_DEPS_${lib} ${llvm_lib_deps})")
|
|
endforeach(lib)
|
|
|
|
configure_file(
|
|
LLVMConfig.cmake.in
|
|
${llvm_cmake_builddir}/LLVMConfig.cmake
|
|
@ONLY)
|
|
|
|
configure_file(
|
|
LLVMConfigVersion.cmake.in
|
|
${llvm_cmake_builddir}/LLVMConfigVersion.cmake
|
|
@ONLY)
|
|
|
|
if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
|
|
install(FILES
|
|
${llvm_cmake_builddir}/LLVMConfig.cmake
|
|
${llvm_cmake_builddir}/LLVMConfigVersion.cmake
|
|
LLVM-Config.cmake
|
|
DESTINATION ${LLVM_INSTALL_PACKAGE_DIR})
|
|
|
|
install(DIRECTORY .
|
|
DESTINATION ${LLVM_INSTALL_PACKAGE_DIR}
|
|
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()
|