# Copyright 2024 Google, LLC
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice (including the next
# paragraph) shall be included in all copies or substantial portions of the
# Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.

mesa_build_root = "//third_party/gfxstream/src/guest/mesa-gn"
mesa_source_root = "//third_party/gfxstream/src/guest/mesa"
mesa_vk_xml = "$mesa_source_root/src/vulkan/registry/vk.xml"

template("mesa_source_set") {
  source_set(target_name) {
    # Can't forward configs because doing so overwrites the default
    # configs specified by the build system.
    forward_variables_from(invoker, "*", [ "configs" ])
    if (!defined(public_configs)) {
      public_configs = []
    }
    public_configs += [ "$mesa_build_root/src:common_config" ]
    if (defined(invoker.configs)) {
      configs += invoker.configs
    }
  }
}
