[PATCH] Bug 19462 - Use the INSTALL(EXPORT ...) to export CMake definitions
Chris Bieneman
beanz at apple.com
Fri Feb 13 13:58:51 PST 2015
Hi rnk,
This patch moves all the clang library targets into a ClangTargets export list, and installs it using the CMake install(EXPORT...) command.
http://reviews.llvm.org/D7623
Files:
CMakeLists.txt
Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt
+++ CMakeLists.txt
@@ -362,6 +362,7 @@
if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY OR ${name} STREQUAL "libclang")
install(TARGETS ${name}
+ EXPORT ClangTargets
LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX}
ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX}
RUNTIME DESTINATION bin)
@@ -520,9 +521,10 @@
# Install a <prefix>/share/clang/cmake/ClangConfig.cmake file so that
# find_package(Clang) works. Install the target list with it.
+ install(EXPORT ClangTargets DESTINATION ${LLVM_INSTALL_PACKAGE_DIR})
+
install(FILES
${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules/ClangConfig.cmake
- ${CLANG_BINARY_DIR}/share/clang/cmake/ClangTargets.cmake
DESTINATION share/clang/cmake)
# Also copy ClangConfig.cmake to the build directory so that dependent projects
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D7623.19930.patch
Type: text/x-patch
Size: 925 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150213/7e6ba4de/attachment.bin>
More information about the cfe-commits
mailing list