# Copyright 2019 The Dawn & Tint Authors
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this
#    list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright notice,
#    this list of conditions and the following disclaimer in the documentation
#    and/or other materials provided with the distribution.
#
# 3. Neither the name of the copyright holder nor the names of its
#    contributors may be used to endorse or promote products derived from
#    this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

import("../../scripts/dawn_overrides_with_defaults.gni")

import("${dawn_root}/generator/dawn_generator.gni")
import("${dawn_root}/scripts/dawn_component.gni")

###############################################################################
# Dawn C++ wrapper
###############################################################################

dawn_json_generator("cpp_gen") {
  target = "cpp"
  outputs = [ "src/dawn/webgpu_cpp.cpp" ]
}

source_set("cpp") {
  public_deps = [ "${dawn_root}/include/dawn:cpp_headers" ]
  deps = [ ":cpp_gen" ]
  sources = get_target_outputs(":cpp_gen")
}

###############################################################################
# Dawn proc
###############################################################################

dawn_json_generator("proc_gen") {
  target = "proc"
  outputs = [
    "src/dawn/dawn_proc.cpp",
    "src/dawn/dawn_thread_dispatch_proc.cpp",
  ]
}

dawn_component("proc") {
  DEFINE_PREFIX = "WGPU"

  public_deps = [ "${dawn_root}/include/dawn:headers" ]
  deps = [
    ":proc_gen",
    "${dawn_root}/src/dawn/common",
  ]
  sources = get_target_outputs(":proc_gen")
  sources += [
    "${dawn_root}/include/dawn/dawn_proc.h",
    "${dawn_root}/include/dawn/dawn_thread_dispatch_proc.h",
  ]
}

###############################################################################
# Other generated files (upstream header, emscripten header, emscripten bits)
###############################################################################

dawn_json_generator("webgpu_headers_gen") {
  target = "webgpu_headers"
  outputs = [ "webgpu-headers/webgpu.h" ]
}

dawn_json_generator("emscripten_bits_gen") {
  target = "emscripten_bits"
  outputs = [
    "emscripten-bits/system/include/webgpu/webgpu.h",
    "emscripten-bits/system/include/webgpu/webgpu_cpp.h",
    "emscripten-bits/system/include/webgpu/webgpu_cpp_chained_struct.h",
    "emscripten-bits/system/lib/webgpu/webgpu_cpp.cpp",
    "emscripten-bits/webgpu_struct_info.json",
    "emscripten-bits/library_webgpu_enum_tables.js",
  ]
}
