set(llvm_cmake_builddir "${LLVM_BINARY_DIR}/share/llvm/cmake")
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 LLVM_LIB_DEPS_${lib})
  set(all_llvm_lib_deps
    "${all_llvm_lib_deps}\nset_property(GLOBAL PROPERTY LLVM_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)

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

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

set(llvm_cmake_builddir "${LLVM_BINARY_DIR}/share/llvm/cmake")
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 LLVM_LIB_DEPS_${lib})
  set(all_llvm_lib_deps
    "${all_llvm_lib_deps}\nset_property(GLOBAL PROPERTY LLVM_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)

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

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

Complete the removal of FindBison from CMake. Noticed this when browsing some CMake patch backlog...
Complete the removal of FindBison from CMake. Noticed this when browsing
some CMake patch backlog...

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