BUILD.gn 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. import("//build/config/ui.gni")
  2. filenames_gypi = exec_script(
  3. "//build/gypi_to_gn.py",
  4. [ rebase_path("filenames.gypi") ],
  5. "scope",
  6. [ "filenames.gypi" ]
  7. )
  8. if (is_linux) {
  9. # TODO: Experiment with using //tools/generate_library_loader for generating
  10. # the libnotify loader.
  11. copy("libnotify_headers") {
  12. sources = [
  13. "/usr/include/libnotify/notify.h",
  14. "/usr/include/libnotify/notification.h",
  15. "/usr/include/libnotify/notify-enum-types.h",
  16. "/usr/include/libnotify/notify-features.h",
  17. ]
  18. outputs = [ "$target_gen_dir/libnotify-copy/libnotify/{{source_file_part}}" ]
  19. }
  20. config("libnotify_config") {
  21. include_dirs = [ "$target_gen_dir/libnotify-copy" ]
  22. }
  23. group("libnotify") {
  24. deps = [ ":libnotify_headers" ]
  25. public_configs = [ ":libnotify_config" ]
  26. }
  27. }
  28. static_library("brightray") {
  29. deps = [
  30. "//base",
  31. "//components/network_session_configurator/common",
  32. "//components/prefs",
  33. "//content/public/browser",
  34. "//content/shell:resources",
  35. "//net:net_with_v8",
  36. "//skia",
  37. "//ui/views",
  38. ]
  39. include_dirs = [
  40. "..",
  41. ]
  42. defines = [
  43. "DISABLE_NACL=1",
  44. ]
  45. if (is_linux) {
  46. deps += [
  47. "//build/config/linux/gtk3",
  48. ":libnotify",
  49. ]
  50. }
  51. extra_source_filters = []
  52. if (is_mac) {
  53. extra_source_filters += [
  54. "*_views.cc",
  55. "*_views.h",
  56. "*\bviews/*",
  57. ]
  58. }
  59. set_sources_assignment_filter(sources_assignment_filter + extra_source_filters)
  60. sources = filenames_gypi.brightray_sources
  61. set_sources_assignment_filter(sources_assignment_filter)
  62. }