diff options
author | Juan Ramos <[email protected]> | 2023-07-05 15:16:20 -0600 |
---|---|---|
committer | Juan Ramos <[email protected]> | 2023-07-05 15:22:17 -0600 |
commit | 482af6d865a925911eefa84f8ea9d9170f5168ad (patch) | |
tree | 7f816ef390aebcf8839fc9097c7f1434b2c35d46 /tests | |
parent | 6f34ca5a370c3664c02abdfc9b11baf7b0c369bd (diff) | |
download | Vulkan-Headers-482af6d865a925911eefa84f8ea9d9170f5168ad.tar.gz Vulkan-Headers-482af6d865a925911eefa84f8ea9d9170f5168ad.zip |
cmake: Remove VULKAN_HEADERS_INSTALL
VULKAN_HEADERS_INSTALL was added since it was believed there was
a valid use case for it.
After looking into the use case that provoked this change there is
no reason to keep VULKAN_HEADERS_INSTALL as an option.
Here is the use case we do NOT want to support:
https://github.com/KhronosGroup/Vulkan-Headers/pull/416#issuecomment-1622318949
Fundamentally this problem is caused add_subdirectory/find_package
not being able to work together flawlessly.
Which isn't the responsibility of Vulkan-Headers to fix.
It's the responsibility of projects that consume Vulkan-Headers
to account for either method.
As described by the CMake maintainers:
https://discourse.cmake.org/t/idiomatic-way-to-handle-packages-and-add-subdirectory/8400
Diffstat (limited to 'tests')
-rw-r--r-- | tests/add_subdirectory/CMakeLists.txt | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/tests/add_subdirectory/CMakeLists.txt b/tests/add_subdirectory/CMakeLists.txt index 74f2066..cb8fdcc 100644 --- a/tests/add_subdirectory/CMakeLists.txt +++ b/tests/add_subdirectory/CMakeLists.txt @@ -8,12 +8,9 @@ if (NOT TARGET Vulkan::Headers) message(FATAL_ERROR "Vulkan::Headers target not defined") endif() -# By default installation for a subproject should be disabled. -# This makes it easier to consume for most projects. -# Consuming the vulkan-headers via add_subdirectory and installing -# them is the more niche use case. -if (VULKAN_HEADERS_INSTALL) - message(FATAL_ERROR "VULKAN_HEADERS_INSTALL should be OFF!") +# Consuming vulkan-headers via add_subdirectory should NOT add installation code to the parent CMake project. +if (DEFINED CMAKE_INSTALL_INCLUDEDIR) + message(FATAL_ERROR "CMAKE_INSTALL_INCLUDEDIR was defined!") endif() add_library(foobar STATIC) |