chromium/content/browser/tracing/BUILD.gn

# Copyright 2014 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import("//tools/grit/grit_rule.gni")
import("//ui/webui/resources/tools/generate_grd.gni")

assert(!is_android)

# The script just writes filename with no dirs to the .grd, so we always need
# this file to be in the same directory as the inputs.
tracing_grd = "$target_gen_dir/tracing_resources.grd"

generate_grd("build_grd") {
  grd_prefix = "tracing"
  out_grd = tracing_grd
  input_files = [
    "about_tracing.html",
    "about_tracing.js",
  ]
  input_files_base_dir = rebase_path(target_gen_dir, root_build_dir)
  deps = [ "//third_party/catapult/tracing:generate_about_tracing" ]
}

grit("resources") {
  source = tracing_grd

  # Required because the .grd is generated.
  enable_input_discovery_for_gn_analyze = false

  outputs = [
    "grit/tracing_resources.h",
    "grit/tracing_resources_map.cc",
    "grit/tracing_resources_map.h",
    "tracing_resources.pak",
  ]

  deps = [ ":build_grd" ]
}