diff --git a/cmake/modules/CMakeLists.txt b/cmake/modules/CMakeLists.txt index 0253952caee..b48018d51f9 100644 --- a/cmake/modules/CMakeLists.txt +++ b/cmake/modules/CMakeLists.txt @@ -1,4 +1,5 @@ -set(llvm_cmake_builddir "${LLVM_BINARY_DIR}/share/llvm/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) @@ -24,10 +25,10 @@ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY) ${llvm_cmake_builddir}/LLVMConfig.cmake ${llvm_cmake_builddir}/LLVMConfigVersion.cmake LLVM-Config.cmake - DESTINATION share/llvm/cmake) + DESTINATION ${LLVM_INSTALL_PACKAGE_DIR}) install(DIRECTORY . - DESTINATION share/llvm/cmake + DESTINATION ${LLVM_INSTALL_PACKAGE_DIR} FILES_MATCHING PATTERN *.cmake PATTERN .svn EXCLUDE PATTERN LLVMConfig.cmake EXCLUDE