Skip to content

Commit

Permalink
Disable building DXC if SDLSHADERCROSS_DXC is set to OFF and SDLSHADE…
Browse files Browse the repository at this point in the history
…RCROSS_VENDORED is set to ON
  • Loading branch information
matthew-mccall committed Jan 1, 2025
1 parent 2988c44 commit de22865
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ if(SDLSHADERCROSS_VENDORED)
if(MINGW)
set(CMAKE_C_COMPILER_ARCHITECTURE_ID "${SDL_CPU_NAMES}")
endif()

if(SDLSHADERCROSS_DXC)
set(DXC_COVERAGE OFF)
set(HLSL_INCLUDE_TESTS OFF)
set(LLVM_INCLUDE_TESTS OFF)
Expand All @@ -121,6 +123,7 @@ if(SDLSHADERCROSS_VENDORED)
add_library(DirectXShaderCompiler::dxil ALIAS dxildll)
list(APPEND vendored_targets dxcompiler dxildll)
add_dependencies(dxcompiler dxildll)
endif()

export(TARGETS ${vendored_targets} NAMESPACE "SDL3_shadercross::" FILE "SDL3_shadercross-vendored-targets.cmake")
else()
Expand Down

0 comments on commit de22865

Please sign in to comment.