diff options
Diffstat (limited to 'include/CMakeLists.txt')
-rw-r--r-- | include/CMakeLists.txt | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt index e16dc8b4de63..219d1b730839 100644 --- a/include/CMakeLists.txt +++ b/include/CMakeLists.txt @@ -19,7 +19,7 @@ file(COPY . if (LIBCXX_INSTALL_HEADERS) install(DIRECTORY . DESTINATION include/c++/v1 - COMPONENT libcxx + COMPONENT libcxx-headers FILES_MATCHING ${LIBCXX_HEADER_PATTERN} PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ @@ -41,12 +41,23 @@ if (LIBCXX_INSTALL_HEADERS) # Add a target that executes the generation commands. add_custom_target(generate_config_header ALL DEPENDS ${LIBCXX_BINARY_DIR}/__generated_config) + set(generated_config_deps generate_config_header) # Install the generated header as __config. install(FILES ${LIBCXX_BINARY_DIR}/__generated_config DESTINATION include/c++/v1 PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ RENAME __config - COMPONENT libcxx) + COMPONENT libcxx-headers) + endif() + + if (NOT CMAKE_CONFIGURATION_TYPES) + # this target is just needed as a placeholder for the distribution target + add_custom_target(libcxx-headers) + add_custom_target(install-libcxx-headers + DEPENDS libcxx-headers ${generated_config_deps} + COMMAND "${CMAKE_COMMAND}" + -DCMAKE_INSTALL_COMPONENT=libcxx-headers + -P "${CMAKE_BINARY_DIR}/cmake_install.cmake") endif() endif() |