[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 15:15:54 PST 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rL354527: [clang] Add CMake target for installing clang's CMake exports (authored by smeenai, committed by ).
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Changed prior to commit:
  https://reviews.llvm.org/D58480?vs=187684&id=187688#toc

Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D58480/new/

https://reviews.llvm.org/D58480

Files:
  cfe/trunk/cmake/modules/CMakeLists.txt


Index: cfe/trunk/cmake/modules/CMakeLists.txt
===================================================================
--- cfe/trunk/cmake/modules/CMakeLists.txt
+++ cfe/trunk/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.187688.patch
Type: text/x-patch
Size: 1058 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190220/6fe4832f/attachment.bin>


More information about the cfe-commits mailing list