diff --git a/libc/CMakeLists.txt b/libc/CMakeLists.txt --- a/libc/CMakeLists.txt +++ b/libc/CMakeLists.txt @@ -146,9 +146,14 @@ set(LIBC_INSTALL_DEPENDS) set(LIBC_INSTALL_TARGET) if(LLVM_LIBC_FULL_BUILD) + add_llvm_install_targets( + install-libc-headers + DEPENDS libc-headers + COMPONENT libc-headers + ) set(LIBC_TARGET libc) set(LIBC_COMPONENT libc) - set(LIBC_INSTALL_DEPENDS "libc;libc-headers;libc-startup") + set(LIBC_INSTALL_DEPENDS "libc;install-libc-headers;libc-startup") set(LIBC_INSTALL_TARGET install-libc) set(LIBC_ARCHIVE_NAME c) else() diff --git a/libc/include/CMakeLists.txt b/libc/include/CMakeLists.txt --- a/libc/include/CMakeLists.txt +++ b/libc/include/CMakeLists.txt @@ -266,5 +266,5 @@ get_filename_component(nested_dir ${relative_path} DIRECTORY) install(FILES ${header_file} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${nested_dir} - COMPONENT ${LIBC_COMPONENT}) + COMPONENT libc-headers) endforeach()