1 set(llvm_cmake_builddir "${LLVM_BINARY_DIR}/share/llvm/cmake") 2 set(LLVM_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX}) 3 4 get_property(llvm_libs GLOBAL PROPERTY LLVM_LIBS) 5 6 foreach(lib ${llvm_libs}) 7 get_property(llvm_lib_deps GLOBAL PROPERTY LLVMBUILD_LIB_DEPS_${lib}) 8 set(all_llvm_lib_deps 9 "${all_llvm_lib_deps}\nset_property(GLOBAL PROPERTY LLVMBUILD_LIB_DEPS_${lib} ${llvm_lib_deps})") 10 endforeach(lib) 11 12 configure_file( 13 LLVMConfig.cmake.in 14 ${llvm_cmake_builddir}/LLVMConfig.cmake 15 @ONLY) 16 17 configure_file( 18 LLVMConfigVersion.cmake.in 19 ${llvm_cmake_builddir}/LLVMConfigVersion.cmake 20 @ONLY) 21 22 install(FILES 23 ${llvm_cmake_builddir}/LLVMConfig.cmake 24 ${llvm_cmake_builddir}/LLVMConfigVersion.cmake 25 LLVM-Config.cmake 26 DESTINATION share/llvm/cmake) 27 28 install(DIRECTORY . 29 DESTINATION share/llvm/cmake 30 FILES_MATCHING PATTERN *.cmake 31 PATTERN .svn EXCLUDE 32 PATTERN LLVMConfig.cmake EXCLUDE 33 PATTERN LLVMConfigVersion.cmake EXCLUDE 34 PATTERN LLVM-Config.cmake EXCLUDE 35 PATTERN GetHostTriple.cmake EXCLUDE 36 PATTERN VersionFromVCS.cmake EXCLUDE 37 PATTERN CheckAtomic.cmake EXCLUDE) 38