From 3c8397fa83fe44e1a88543601e777889affa8e07 Mon Sep 17 00:00:00 2001 From: Louis Dionne Date: Mon, 23 Jan 2023 10:19:27 -0500 Subject: [PATCH] [libc++] Fix installation path for the modulemap As pointed out in a post-commit comment of https://reviews.llvm.org/rGd00e035a4270. Differential Revision: https://reviews.llvm.org/D142365 --- libcxx/include/CMakeLists.txt | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/libcxx/include/CMakeLists.txt b/libcxx/include/CMakeLists.txt index 5d4fa91..51bfc8c 100644 --- a/libcxx/include/CMakeLists.txt +++ b/libcxx/include/CMakeLists.txt @@ -909,13 +909,18 @@ if (LIBCXX_INSTALL_HEADERS) ) endforeach() - # Install the generated __config_site and the generated modulemap file. + # Install the generated __config_site file to the per-target include dir. install(FILES "${LIBCXX_GENERATED_INCLUDE_TARGET_DIR}/__config_site" - "${LIBCXX_GENERATED_INCLUDE_DIR}/module.modulemap" DESTINATION "${LIBCXX_INSTALL_INCLUDE_TARGET_DIR}" PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ COMPONENT cxx-headers) + # Install the generated modulemap file to the generic include dir. + install(FILES "${LIBCXX_GENERATED_INCLUDE_DIR}/module.modulemap" + DESTINATION "${LIBCXX_INSTALL_INCLUDE_DIR}" + PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ + COMPONENT cxx-headers) + if (NOT CMAKE_CONFIGURATION_TYPES) add_custom_target(install-cxx-headers DEPENDS cxx-headers -- 2.7.4