BUILD.gn 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. # Copyright 2018 The Chromium Authors. All rights reserved.
  2. # Use of this source code is governed by a BSD-style license that can be
  3. # found in the LICENSE file.
  4. import("//build/buildflag_header.gni")
  5. import("//build/config/chrome_build.gni")
  6. import("//build/config/chromecast_build.gni")
  7. import("//build/config/chromeos/args.gni")
  8. import("//build/config/chromeos/ui_mode.gni")
  9. import("//build/util/process_version.gni")
  10. import("//build_overrides/build.gni")
  11. source_set("buildflag_header_h") {
  12. sources = [ "buildflag.h" ]
  13. }
  14. buildflag_header("branding_buildflags") {
  15. header = "branding_buildflags.h"
  16. if (is_chrome_branded) {
  17. flags = [
  18. "CHROMIUM_BRANDING=0",
  19. "GOOGLE_CHROME_BRANDING=1",
  20. ]
  21. } else {
  22. flags = [
  23. "CHROMIUM_BRANDING=1",
  24. "GOOGLE_CHROME_BRANDING=0",
  25. ]
  26. }
  27. }
  28. buildflag_header("chromecast_buildflags") {
  29. header = "chromecast_buildflags.h"
  30. flags = [
  31. "IS_CASTOS=$is_castos",
  32. "IS_CAST_ANDROID=$is_cast_android",
  33. "ENABLE_CAST_RECEIVER=$enable_cast_receiver",
  34. # TODO(crbug.com/1219802): IS_CHROMECAST is deprecated and will be removed.
  35. # The above flags should be used instead.
  36. "IS_CHROMECAST=$is_chromecast",
  37. ]
  38. }
  39. buildflag_header("chromeos_buildflags") {
  40. header = "chromeos_buildflags.h"
  41. flags = [
  42. "IS_CHROMEOS_DEVICE=$is_chromeos_device",
  43. "IS_CHROMEOS_LACROS=$is_chromeos_lacros",
  44. "IS_CHROMEOS_ASH=$is_chromeos_ash",
  45. "IS_CHROMEOS_WITH_HW_DETAILS=$is_chromeos_with_hw_details",
  46. "IS_REVEN=$is_reven",
  47. ]
  48. }
  49. if (build_with_chromium) {
  50. group("gold_common_pytype") {
  51. testonly = true
  52. data = [ "//build/skia_gold_common/" ]
  53. data_deps = [ "//testing:pytype_dependencies" ]
  54. }
  55. }
  56. if (is_chromeos) {
  57. process_version("version_metadata") {
  58. sources = [ "//chrome/VERSION" ]
  59. template_file = "metadata.json.in"
  60. output = "$root_out_dir/metadata.json"
  61. process_only = true
  62. }
  63. }