Expand build flags for Tint.
This CL extends the build options to Tint to make the various readers
and writers all optional.
Change-Id: I913e1830b1bb2243eff5deb4b8079ba592dd52e1
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/16801
Reviewed-by: David Neto <dneto@google.com>
diff --git a/samples/CMakeLists.txt b/samples/CMakeLists.txt
index 5fb3f61..b144b43 100644
--- a/samples/CMakeLists.txt
+++ b/samples/CMakeLists.txt
@@ -18,6 +18,11 @@
## Tint executable
add_executable(tint ${TINT_SRCS})
-target_link_libraries(tint libtint SPIRV-Tools)
tint_default_compile_options(tint)
+target_link_libraries(tint libtint)
+
+if(${TINT_BUILD_SPV_READER} OR ${TINT_BUILD_SPV_WRITER})
+ target_link_libraries(tint SPIRV-Tools)
+endif()
+