summaryrefslogtreecommitdiffstats
path: root/source/compiler-core
diff options
context:
space:
mode:
authorEmil Imbert Villumsen <emimvi@gmail.com>2025-06-13 21:48:26 +0200
committerGitHub <noreply@github.com>2025-06-13 12:48:26 -0700
commit1d8f6f86d1a6d33ff6e6429206b94d72457e1378 (patch)
treee5ae1ec38bc4d8703a9bed809fdd4cf05749b7c5 /source/compiler-core
parentdebdc7251ff31b82ea221893c6475e96dbe4dc16 (diff)
Fix SLANG_USE_SYSTEM_SPIRV_HEADERS (#7371)
* Use aliased SPIRV-Headers::SPIRV-Headers to also work with an installed SPIRV-Headers SPIRV-Headers standalone is only defined when using sources directly. When consuming an installed SPIRV-Headers via find_package, the full SPIRV-Headers::SPIRV-Headers must be used. The full syntax is supported by both source and installed builds. * Fix SLANG_USE_SYSTEM_SPIRV_HEADERS - Use find_package to bring in SPIRV-Headers cmake targets - Set SPIRV-Headers_SOURCE_DIR as a workaround when including spirv-tools - Query cmake for SLANG_SPIRV_HEADERS_INCLUDE_DIR location, supporting default, SLANG_OVERRIDE_SPIRV_HEADERS_PATH and find_package builds. - Cleanup unnecessary SPIRV_HEADER_DIR (unconditionally overwritten in spirv-tools)
Diffstat (limited to 'source/compiler-core')
-rw-r--r--source/compiler-core/CMakeLists.txt2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/compiler-core/CMakeLists.txt b/source/compiler-core/CMakeLists.txt
index d3a88fddd..1873b21d4 100644
--- a/source/compiler-core/CMakeLists.txt
+++ b/source/compiler-core/CMakeLists.txt
@@ -5,7 +5,7 @@ slang_add_target(
EXCLUDE_FROM_ALL
USE_EXTRA_WARNINGS
LINK_WITH_PRIVATE core
- INCLUDE_FROM_PUBLIC SPIRV-Headers
+ INCLUDE_FROM_PUBLIC SPIRV-Headers::SPIRV-Headers
)
if(NOT MSVC)
# This is necessary to compile the DXC headers