summaryrefslogtreecommitdiffhomepage
path: root/tests/add_subdirectory/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'tests/add_subdirectory/CMakeLists.txt')
-rw-r--r--tests/add_subdirectory/CMakeLists.txt9
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)