[CMake] Create a separate install target for libcxx headers
This change doesn't impact the behavior of the install-libcxx target which installs whichever libcxx components you build, it just adds a separate target to just install the headers.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@268124 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
index 3e3c47f..d442875 100644
--- a/lib/CMakeLists.txt
+++ b/lib/CMakeLists.txt
@@ -180,8 +180,11 @@
if(LIBCXX_INSTALL_LIBRARY)
set(deps DEPENDS cxx)
endif()
+ if(LIBCXX_INSTALL_HEADERS)
+ set(deps DEPENDS install-libcxx-headers)
+ endif()
add_custom_target(install-libcxx
- ${deps}
+ ${deps}
COMMAND "${CMAKE_COMMAND}"
-DCMAKE_INSTALL_COMPONENT=libcxx
-P "${LIBCXX_BINARY_DIR}/cmake_install.cmake")