Updated CMakeLists.txt

This commit is contained in:
Jarrod Norwell 2024-03-06 03:27:06 +08:00
parent 1c2050fa9e
commit e8daed1482

View file

@ -88,8 +88,10 @@ enable_testing(true)
if (SIRIT_USE_SYSTEM_SPIRV_HEADERS) if (SIRIT_USE_SYSTEM_SPIRV_HEADERS)
find_package(SPIRV-Headers REQUIRED) find_package(SPIRV-Headers REQUIRED)
else() else()
add_subdirectory(externals/SPIRV-Headers EXCLUDE_FROM_ALL) if (NOT TARGET SPIRV-Headers::SPIRV::Headers)
add_library(SPIRV-Headers::SPIRV-Headers ALIAS SPIRV-Headers) add_subdirectory(externals/SPIRV-Headers EXCLUDE_FROM_ALL)
add_library(SPIRV-Headers::SPIRV-Headers ALIAS SPIRV-Headers)
endif()
endif() endif()
# Sirit project files # Sirit project files