BUILD.gn 1.6 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:extras",
  36. "//net:net_with_v8",
  37. "//skia",
  38. "//ui/views",
  39. ]
  40. include_dirs = [
  41. "..",
  42. ]
  43. defines = [
  44. "DISABLE_NACL=1",
  45. ]
  46. if (is_linux) {
  47. deps += [
  48. "//build/config/linux/gtk3",
  49. ":libnotify",
  50. ]
  51. }
  52. extra_source_filters = []
  53. if (is_mac) {
  54. extra_source_filters += [
  55. "*_views.cc",
  56. "*_views.h",
  57. "*\bviews/*",
  58. ]
  59. }
  60. set_sources_assignment_filter(sources_assignment_filter + extra_source_filters)
  61. sources = filenames_gypi.brightray_sources
  62. set_sources_assignment_filter(sources_assignment_filter)
  63. }