diff --git a/CMakeLists.txt b/CMakeLists.txt index ca7e3b6..dd6d0fd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -88,8 +88,10 @@ enable_testing(true) if (SIRIT_USE_SYSTEM_SPIRV_HEADERS) find_package(SPIRV-Headers REQUIRED) else() - add_subdirectory(externals/SPIRV-Headers EXCLUDE_FROM_ALL) - add_library(SPIRV-Headers::SPIRV-Headers ALIAS SPIRV-Headers) + if (NOT TARGET SPIRV-Headers::SPIRV::Headers) + add_subdirectory(externals/SPIRV-Headers EXCLUDE_FROM_ALL) + add_library(SPIRV-Headers::SPIRV-Headers ALIAS SPIRV-Headers) + endif() endif() # Sirit project files