GLSL: only build glslang if we're building samples.
We'll need this to build the GLSL backend in Dawn, since we don't want
glslang there.
Bug: tint:1217
Change-Id: Ied44ca89286c1d53a2e58a7083f0bfb859976770
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/79500
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Stephen White <senorblanco@chromium.org>
diff --git a/third_party/CMakeLists.txt b/third_party/CMakeLists.txt
index 47d6664..90862ee 100644
--- a/third_party/CMakeLists.txt
+++ b/third_party/CMakeLists.txt
@@ -47,5 +47,7 @@
if(${TINT_BUILD_GLSL_WRITER})
set(SPIRV-Headers_SOURCE_DIR "${TINT_THIRD_PARTY_DIR}/glslang")
- add_subdirectory("${TINT_THIRD_PARTY_DIR}/glslang" "${CMAKE_BINARY_DIR}/third_party/glslang" EXCLUDE_FROM_ALL)
+ if(${TINT_BUILD_SAMPLES})
+ add_subdirectory("${TINT_THIRD_PARTY_DIR}/glslang" "${CMAKE_BINARY_DIR}/third_party/glslang" EXCLUDE_FROM_ALL)
+ endif()
endif()