r259822 - Install cmake files to lib/cmake/clang
Niels Ole Salscheider via cfe-commits
cfe-commits at lists.llvm.org
Thu Feb 4 12:08:27 PST 2016
Author: olesalscheider
Date: Thu Feb 4 14:08:27 2016
New Revision: 259822
URL: http://llvm.org/viewvc/llvm-project?rev=259822&view=rev
Log:
Install cmake files to lib/cmake/clang
This is the right location for platform-specific files.
Also, search for LLVM's CMake files in this directory.
Modified:
cfe/trunk/CMakeLists.txt
Modified: cfe/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/CMakeLists.txt?rev=259822&r1=259821&r2=259822&view=diff
==============================================================================
--- cfe/trunk/CMakeLists.txt (original)
+++ cfe/trunk/CMakeLists.txt Thu Feb 4 14:08:27 2016
@@ -72,7 +72,7 @@ if( CMAKE_SOURCE_DIR STREQUAL CMAKE_CURR
find_program(LLVM_TABLEGEN_EXE "llvm-tblgen" ${LLVM_TOOLS_BINARY_DIR}
NO_DEFAULT_PATH)
- set(LLVM_CMAKE_PATH "${LLVM_BINARY_DIR}/share/llvm/cmake")
+ set(LLVM_CMAKE_PATH "${LLVM_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm")
set(LLVMCONFIG_FILE "${LLVM_CMAKE_PATH}/LLVMConfig.cmake")
if(EXISTS ${LLVMCONFIG_FILE})
list(APPEND CMAKE_MODULE_PATH "${LLVM_CMAKE_PATH}")
@@ -594,24 +594,24 @@ if (CLANG_BUILT_STANDALONE OR CMAKE_VERS
# Generate a list of CMake library targets so that other CMake projects can
# link against them. LLVM calls its version of this file LLVMExports.cmake, but
# the usual CMake convention seems to be ${Project}Targets.cmake.
- set(CLANG_INSTALL_PACKAGE_DIR share/clang/cmake)
+ set(CLANG_INSTALL_PACKAGE_DIR lib${LLVM_LIBDIR_SUFFIX}/cmake/clang)
set(clang_cmake_builddir "${CMAKE_BINARY_DIR}/${CLANG_INSTALL_PACKAGE_DIR}")
get_property(CLANG_EXPORTS GLOBAL PROPERTY CLANG_EXPORTS)
export(TARGETS ${CLANG_EXPORTS} FILE ${clang_cmake_builddir}/ClangTargets.cmake)
- # Install a <prefix>/share/clang/cmake/ClangConfig.cmake file so that
+ # Install a <prefix>/lib/cmake/clang/ClangConfig.cmake file so that
# find_package(Clang) works. Install the target list with it.
install(EXPORT ClangTargets DESTINATION ${CLANG_INSTALL_PACKAGE_DIR})
install(FILES
${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules/ClangConfig.cmake
- DESTINATION share/clang/cmake)
+ DESTINATION lib${LLVM_LIBDIR_SUFFIX}/cmake/clang)
# Also copy ClangConfig.cmake to the build directory so that dependent projects
# can build against a build directory of Clang more easily.
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules/ClangConfig.cmake
- ${CLANG_BINARY_DIR}/share/clang/cmake/ClangConfig.cmake
+ ${CLANG_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX}/cmake/clang/ClangConfig.cmake
COPYONLY)
endif ()
More information about the cfe-commits
mailing list