summaryrefslogtreecommitdiffstats
path: root/mandoline/services/core_services/BUILD.gn
blob: 27c218efa19ddb2ebf63d4660529f3a4fa073465 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# Copyright 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
#
# core_services should be thought of as a bundle of many of the services which
# we ship with.

import("//build/config/ui.gni")
import("//build/toolchain/toolchain.gni")
import("//mojo/public/mojo_application.gni")

mojo_native_application("core_services") {
  deps = [
    ":sources",
    "//third_party/angle:libEGL",
    "//third_party/angle:libGLESv2",
  ]
  if (is_win) {
    copy("copy_files") {
      sources = [
        "$root_shlib_dir/libEGL.dll",
        "$root_shlib_dir/libGLESv2.dll",
      ]
      outputs = [
        "$root_out_dir/core_services/{{source_file_part}}",
      ]
    }
    deps += [ ":copy_files" ]
  }

  if (!is_android) {
    deps += [ "//third_party/icu:icudata" ]
    resources = [ "$root_out_dir/icudtl.dat" ]
  }
}

source_set("sources") {
  sources = [
    "application_delegate_factory.h",
    "application_delegate_factory_linux.cc",
    "core_services_application_delegate.cc",
    "main.cc",
  ]

  deps = [
    "//base",
    "//components/clipboard:lib",
    "//components/filesystem:lib",
    "//mandoline/tab:lib",
    "//mojo/application/public/cpp",
    "//mojo/common:tracing_impl",
    "//mojo/message_pump",
    "//mojo/services/tracing:lib",
    "//third_party/icu",
    "//third_party/mojo/src/mojo/public/cpp/bindings",
    "//url",
  ]

  if (!is_android) {
    sources += [ "application_delegate_factory_notandroid.cc" ]
    deps += [
      "//components/resource_provider:lib",
      "//components/view_manager:lib",
      "//mojo/services/network:lib",
    ]
  }

  if (is_linux) {
    deps += [ "//components/font_service:lib" ]
  } else {
    sources += [ "application_delegate_factory_default.cc" ]
  }

  if (use_aura) {
    deps += [
      "//components/view_manager/public/cpp",
      "//mandoline/ui/browser:lib",
      "//mandoline/ui/omnibox:lib",
    ]
    sources += [ "application_delegate_factory_aura.cc" ]
  }
}