diff options
| -rw-r--r-- | external/CMakeLists.txt | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/external/CMakeLists.txt b/external/CMakeLists.txt index e0dcdfb40..6b8b5a527 100644 --- a/external/CMakeLists.txt +++ b/external/CMakeLists.txt @@ -105,6 +105,8 @@ target_include_directories( ) # SPIRV-Headers +# Avoid using ${system} intentionally in `add_subdirectory`, because if we do, it will end up using +# spirv.h installed in the system directory on MacOS. if(NOT TARGET SPIRV-Headers) if(SLANG_USE_SYSTEM_SPIRV_HEADERS) if(SLANG_OVERRIDE_SPIRV_HEADERS_PATH) @@ -118,10 +120,9 @@ if(NOT TARGET SPIRV-Headers) ${SLANG_OVERRIDE_SPIRV_HEADERS_PATH}/spirv-headers spirv-headers EXCLUDE_FROM_ALL - ${system} ) else() - add_subdirectory(spirv-headers EXCLUDE_FROM_ALL ${system}) + add_subdirectory(spirv-headers EXCLUDE_FROM_ALL) endif() endif() @@ -205,13 +206,12 @@ if(SLANG_ENABLE_SLANG_GLSLANG) # Tools if(NOT SLANG_OVERRIDE_SPIRV_TOOLS_PATH) - add_subdirectory(spirv-tools EXCLUDE_FROM_ALL ${system}) + add_subdirectory(spirv-tools EXCLUDE_FROM_ALL) else() add_subdirectory( ${SLANG_OVERRIDE_SPIRV_TOOLS_PATH}/spirv-tools spirv-tools EXCLUDE_FROM_ALL - ${system} ) endif() endif() |
