summaryrefslogtreecommitdiffstats
path: root/source/slang/CMakeLists.txt
diff options
context:
space:
mode:
authorjarcherNV <jarcher@nvidia.com>2025-03-06 19:16:27 -0800
committerGitHub <noreply@github.com>2025-03-07 03:16:27 +0000
commit9d7d943db47dd7805a710431cf7eedc0bec8ecc7 (patch)
tree851f51e2087f76b39ea19a8ca4ec8cf4555a4bb2 /source/slang/CMakeLists.txt
parent2aaa91007a9f91674033dcb9d88eb9ad7bacae96 (diff)
Update build to allow setting external paths (#6528)
* Update build to allow setting external paths Update the build to allow setting user-specific paths for the external modules. This allows building Slang without also fetching the external modules, assuming they are already present elsewhere locally.
Diffstat (limited to 'source/slang/CMakeLists.txt')
-rw-r--r--source/slang/CMakeLists.txt12
1 files changed, 9 insertions, 3 deletions
diff --git a/source/slang/CMakeLists.txt b/source/slang/CMakeLists.txt
index b9e78407b..9c51ed767 100644
--- a/source/slang/CMakeLists.txt
+++ b/source/slang/CMakeLists.txt
@@ -110,9 +110,15 @@ target_include_directories(
#
if(NOT SLANG_USE_SYSTEM_SPIRV_HEADERS)
- set(SLANG_SPIRV_HEADERS_INCLUDE_DIR
- "${slang_SOURCE_DIR}/external/spirv-headers/include"
- )
+ if(NOT SLANG_OVERRIDE_SPIRV_HEADERS_PATH)
+ set(SLANG_SPIRV_HEADERS_INCLUDE_DIR
+ "${slang_SOURCE_DIR}/external/spirv-headers/include"
+ )
+ else()
+ set(SLANG_SPIRV_HEADERS_INCLUDE_DIR
+ "${SLANG_OVERRIDE_SPIRV_HEADERS_PATH}/include"
+ )
+ endif()
endif()
set(SLANG_LOOKUP_GENERATOR_INPUT_JSON