# 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
################################################################################

tint_add_target("api"
  api/tint.cc
  api/tint.h
)

tint_target_add_dependencies("api"
  "lang/core"
  "lang/core/constant"
  "lang/core/type"
  "lang/hlsl/writer/common"
  "lang/spirv/reader/common"
  "lang/wgsl/ast"
  "lang/wgsl/program"
  "lang/wgsl/reader"
  "lang/wgsl/sem"
  "lang/wgsl/writer"
  "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_GLSL_WRITER)
  tint_target_add_dependencies("api"
    "lang/glsl/writer"
    "lang/glsl/writer/common"
  )
endif(TINT_BUILD_GLSL_WRITER)

if (TINT_BUILD_HLSL_WRITER)
  tint_target_add_dependencies("api"
    "lang/hlsl/writer"
  )
endif(TINT_BUILD_HLSL_WRITER)

if (TINT_BUILD_MSL_WRITER)
  tint_target_add_dependencies("api"
    "lang/msl/writer"
    "lang/msl/writer/common"
  )
endif(TINT_BUILD_MSL_WRITER)

if (TINT_BUILD_SPV_READER)
  tint_target_add_dependencies("api"
    "lang/spirv/reader"
  )
endif(TINT_BUILD_SPV_READER)

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