# Copyright 2023 The Tint Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

################################################################################
# File generated by tools/src/cmd/gen
# using the template:
#   tools/src/cmd/gen/build/BUILD.cmake.tmpl
#
# Do not modify this file directly
################################################################################

if(TINT_BUILD_SPV_WRITER  AND  TINT_BUILD_IR)
tint_add_target("lang/spirv/writer/printer"
  lang/spirv/writer/printer/printer.cc
  lang/spirv/writer/printer/printer.h
)

tint_target_add_dependencies("lang/spirv/writer/printer"
  "lang/core"
  "lang/core/constant"
  "lang/core/type"
  "lang/wgsl/ast"
  "lang/wgsl/program"
  "lang/wgsl/sem"
  "utils/containers"
  "utils/diagnostic"
  "utils/ice"
  "utils/id"
  "utils/macros"
  "utils/math"
  "utils/memory"
  "utils/reflection"
  "utils/result"
  "utils/rtti"
  "utils/symbol"
  "utils/text"
  "utils/traits"
)

if (TINT_BUILD_IR)
  tint_target_add_dependencies("lang/spirv/writer/printer"
    "lang/core/ir"
  )
endif(TINT_BUILD_IR)

if (TINT_BUILD_SPV_READER  OR  TINT_BUILD_SPV_WRITER)
  tint_target_add_external_dependencies("lang/spirv/writer/printer"
    "spirv-headers"
  )
endif(TINT_BUILD_SPV_READER  OR  TINT_BUILD_SPV_WRITER)

if (TINT_BUILD_SPV_WRITER)
  tint_target_add_dependencies("lang/spirv/writer/printer"
    "lang/spirv/writer/ast_printer"
    "lang/spirv/writer/common"
  )
endif(TINT_BUILD_SPV_WRITER)

if (TINT_BUILD_SPV_WRITER  AND  TINT_BUILD_IR)
  tint_target_add_dependencies("lang/spirv/writer/printer"
    "lang/spirv/writer/raise"
  )
endif(TINT_BUILD_SPV_WRITER  AND  TINT_BUILD_IR)

endif(TINT_BUILD_SPV_WRITER  AND  TINT_BUILD_IR)