SDL_shadercross: Disable building DXC if SDLSHADERCROSS_DXC is set to OFF and SDLSHADERCROSS_VENDORED is set to ON

From d98fbf341ba840adaf4db88a0e9d44dac228fb8c Mon Sep 17 00:00:00 2001
From: Matthew McCall <[EMAIL REDACTED]>
Date: Wed, 1 Jan 2025 17:39:38 -0500
Subject: [PATCH] Disable building DXC if SDLSHADERCROSS_DXC is set to OFF and
 SDLSHADERCROSS_VENDORED is set to ON

---
 CMakeLists.txt | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2f37a66..7e9520b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -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)
@@ -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()