set(llvm_cmake_builddir "${LLVM_BINARY_DIR}/share/llvm/cmake")

configure_file(
  LLVM.cmake
  ${llvm_cmake_builddir}/LLVM.cmake
  @ONLY)

install(FILES
  ${llvm_cmake_builddir}/LLVM.cmake
  LLVMConfig.cmake
  LLVMLibDeps.cmake
  DESTINATION share/llvm/cmake)

install(DIRECTORY .
  DESTINATION share/llvm/cmake
  PATTERN *.cmake
  PATTERN LLVM.cmake EXCLUDE
  PATTERN LLVMConfig.cmake EXCLUDE
  PATTERN LLVMLibDeps.cmake EXCLUDE
  PATTERN FindBison.cmake EXCLUDE
  PATTERN GetTargetTriple.cmake EXCLUDE
  PATTERN VersionFromVCS.cmake EXCLUDE
  PATTERN CheckAtomic.cmake EXCLUDE)

install(FILES
  ${llvm_cmake_builddir}/LLVM.cmake
  LLVMConfig.cmake
  LLVMLibDeps.cmake
  DESTINATION share/llvm/cmake)

set(llvm_cmake_builddir "${LLVM_BINARY_DIR}/share/llvm/cmake")

configure_file(
  LLVM.cmake
  ${llvm_cmake_builddir}/LLVM.cmake
  @ONLY)

install(FILES
  ${llvm_cmake_builddir}/LLVM.cmake
  LLVMConfig.cmake
  LLVMLibDeps.cmake
  DESTINATION share/llvm/cmake)

install(DIRECTORY .
  DESTINATION share/llvm/cmake
  FILES_MATCHING PATTERN *.cmake
  PATTERN .svn EXCLUDE
  PATTERN LLVM.cmake EXCLUDE
  PATTERN LLVMConfig.cmake EXCLUDE
  PATTERN LLVMLibDeps.cmake EXCLUDE
  PATTERN FindBison.cmake EXCLUDE
  PATTERN GetTargetTriple.cmake EXCLUDE
  PATTERN VersionFromVCS.cmake EXCLUDE
  PATTERN CheckAtomic.cmake EXCLUDE)

install(FILES
  ${llvm_cmake_builddir}/LLVM.cmake
  LLVMConfig.cmake
  LLVMLibDeps.cmake
  DESTINATION share/llvm/cmake)

Install only *.cmake files. Don't install .svn directory.
Install only *.cmake files. Don't install .svn directory.

Fixes PR9159.

git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@125001 91177308-0d34-0410-b5e6-96231b3b80d8
