[PATCH] D58480: [clang] Add CMake target for installing clang's CMake exports
Shoaib Meenai via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Feb 20 14:56:48 PST 2019
smeenai created this revision.
smeenai added reviewers: beanz, phosek.
Herald added a subscriber: mgorny.
Herald added a project: clang.
smeenai retitled this revision from "[clang] Add CMake target for clang's CMake exports" to "[clang] Add CMake target for installing clang's CMake exports".
This mirrors LLVM's install-cmake-exports target.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D58480
Files:
clang/cmake/modules/CMakeLists.txt
Index: clang/cmake/modules/CMakeLists.txt
===================================================================
--- clang/cmake/modules/CMakeLists.txt
+++ clang/cmake/modules/CMakeLists.txt
@@ -55,10 +55,19 @@
if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
get_property(clang_has_exports GLOBAL PROPERTY CLANG_HAS_EXPORTS)
if(clang_has_exports)
- install(EXPORT ClangTargets DESTINATION ${CLANG_INSTALL_PACKAGE_DIR})
+ install(EXPORT ClangTargets DESTINATION ${CLANG_INSTALL_PACKAGE_DIR}
+ COMPONENT clang-cmake-exports)
endif()
install(FILES
${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/ClangConfig.cmake
- DESTINATION ${CLANG_INSTALL_PACKAGE_DIR})
+ DESTINATION ${CLANG_INSTALL_PACKAGE_DIR}
+ COMPONENT clang-cmake-exports)
+
+ if(NOT LLVM_ENABLE_IDE)
+ # Add a dummy target so this can be used with LLVM_DISTRIBUTION_COMPONENTS
+ add_custom_target(clang-cmake-exports)
+ add_llvm_install_targets(install-clang-cmake-exports
+ COMPONENT clang-cmake-exports)
+ endif()
endif()
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D58480.187684.patch
Type: text/x-patch
Size: 1046 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190220/a95540fe/attachment.bin>
More information about the cfe-commits
mailing list