From f5fad0a209a2e09eb5e622d930d5eade1a235b13 Mon Sep 17 00:00:00 2001 From: Charles Giessen <46324611+charles-lunarg@users.noreply.github.com> Date: Wed, 8 Oct 2025 11:20:10 -0500 Subject: [PATCH] Revert "CMake: Don't install C++ module headers if module build is disabled" This reverts commit 37057b4756df4009ad85803bd2e06ec8a3bb1bca. --- CMakeLists.txt | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index fa5e087..c0a7ee7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -113,18 +113,11 @@ if (VULKAN_HEADERS_ENABLE_INSTALL) include(GNUInstallDirs) include(CMakePackageConfigHelpers) - if(VULKAN_HEADERS_ENABLE_MODULE) - install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/include/vk_video" DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) - install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/include/vulkan" DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) - # Preserve source permissions https://github.com/KhronosGroup/Vulkan-Headers/issues/336 - install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/registry" DESTINATION "${CMAKE_INSTALL_DATADIR}/vulkan" USE_SOURCE_PERMISSIONS) - else() - # Don't install C++ module files if modules aren't enabled - install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/include/vk_video" DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} PATTERN "*.cppm" EXCLUDE) - install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/include/vulkan" DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} PATTERN "*.cppm" EXCLUDE) - # Preserve source permissions https://github.com/KhronosGroup/Vulkan-Headers/issues/336 - install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/registry" DESTINATION "${CMAKE_INSTALL_DATADIR}/vulkan" USE_SOURCE_PERMISSIONS PATTERN "*.cppm" EXCLUDE) - endif() + install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/include/vk_video" DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) + install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/include/vulkan" DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) + # Preserve source permissions https://github.com/KhronosGroup/Vulkan-Headers/issues/336 + install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/registry" DESTINATION "${CMAKE_INSTALL_DATADIR}/vulkan" USE_SOURCE_PERMISSIONS) + set_target_properties(Vulkan-Headers PROPERTIES EXPORT_NAME "Headers") install(TARGETS Vulkan-Headers