summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorChris Bieneman <beanz@apple.com>2015-02-18 19:25:47 +0000
committerChris Bieneman <beanz@apple.com>2015-02-18 19:25:47 +0000
commitbc20f6088d61d94bb7d9a55a4442dc5716c9832f (patch)
tree3c2395332f4003d8d2dd76db775a3444e29a215e /CMakeLists.txt
parent798787cea41af4da9883191ce21d062236afa451 (diff)
Adding install targets for individual LLVM tools and libraries.
Summary: * add_llvm_tool and add_llvm_library now add install-${name} targets to install specific components * added installhdrs target to install just the LLVM headers * The above changes only apply for single-configuration generators (Ninja, Makefiles...), not for multi-configuration generators (Visual Studio, Xcode...) Reviewers: pete Reviewed By: pete Subscribers: pete, llvm-commits Differential Revision: http://reviews.llvm.org/D7619 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229727 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt10
1 files changed, 10 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 93356096f7..3da8ff01b2 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -631,6 +631,7 @@ add_subdirectory(cmake/modules)
if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
install(DIRECTORY include/llvm include/llvm-c
DESTINATION include
+ COMPONENT llvm-headers
FILES_MATCHING
PATTERN "*.def"
PATTERN "*.h"
@@ -642,6 +643,7 @@ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
install(DIRECTORY ${LLVM_INCLUDE_DIR}/llvm
DESTINATION include
+ COMPONENT llvm-headers
FILES_MATCHING
PATTERN "*.def"
PATTERN "*.h"
@@ -652,4 +654,12 @@ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
PATTERN "config.h" EXCLUDE
PATTERN ".svn" EXCLUDE
)
+
+ if (NOT CMAKE_CONFIGURATION_TYPES)
+ add_custom_target(installhdrs
+ DEPENDS ${name}
+ COMMAND "${CMAKE_COMMAND}"
+ -DCMAKE_INSTALL_COMPONENT=llvm-headers
+ -P "${CMAKE_BINARY_DIR}/cmake_install.cmake")
+ endif()
endif()