[tintd] Simplify installation
* Remove the CMake TINT_INSTALL_TINTD flag: it doesn't install, just use TINT_BUILD_TINTD.
* Make the default of './tools/run tintd install' copy instead of symlink.
* Enable TINT_BUILD_TINTD with setup-build.
Bug: tint:2127
Change-Id: I6a5b439225445cabe6d6bf5f20fe959c559728ac
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/180484
Commit-Queue: Ben Clayton <bclayton@google.com>
Kokoro: Ben Clayton <bclayton@google.com>
Reviewed-by: David Neto <dneto@google.com>
diff --git a/src/tint/CMakeLists.txt b/src/tint/CMakeLists.txt
index f52eae2..88fa5f8 100644
--- a/src/tint/CMakeLists.txt
+++ b/src/tint/CMakeLists.txt
@@ -661,7 +661,8 @@
################################################################################
# tintd (VSCode WGSL language server)
################################################################################
-if(TINT_INSTALL_TINTD)
+if(TINT_BUILD_TINTD)
+ # Copy all the files out of cmd/tintd/vscode to {build}/vscode
set(VSCODE_SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/cmd/tintd/vscode")
set(VSCODE_DST_DIR "${DAWN_BUILD_GEN_DIR}/vscode")
@@ -670,7 +671,7 @@
configure_file("${VSCODE_SRC_DIR}/${FILE}" "${VSCODE_DST_DIR}/${FILE}" COPYONLY)
endforeach()
set_target_properties(tint_cmd_tintd_cmd PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${VSCODE_DST_DIR}")
-endif(TINT_INSTALL_TINTD)
+endif(TINT_BUILD_TINTD)
################################################################################