summaryrefslogtreecommitdiffstats
path: root/mojo/public/dart/BUILD.gn
blob: 89af889199be266210930255d2c881d7814d9c69 (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
# Copyright 2014 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.

group("dart") {
  testonly = true
  deps = [
    ":core",
    ":bindings",
  ]
}


group("core") {
  deps = [
    ":mojo_dart_core",
    ":copy_core_library",
  ]
}


shared_library("mojo_dart_core") {
  defines = ["DART_SHARED_LIB"]
  sources = [
    "src/mojo_dart_core.cc",
  ]
  deps = [
    "//mojo/public/c/environment",
    "//mojo/public/c/system:for_shared_library",
    "//mojo/public/cpp/environment:standalone",
    "//mojo/public/cpp/system",
    "//mojo/public/cpp/utility",
    "//mojo/public/cpp/bindings:callback",
  ]
}


copy("copy_core_library") {
  sources = [
    "$root_out_dir/libmojo_dart_core.so",
  ]
  outputs = [
    "$root_out_dir/gen/mojo/public/dart/src/libmojo_dart_core.so"
  ]
  deps =[
    ":mojo_dart_core"
  ]
}


copy("bindings") {
  sources = [
    "bindings.dart",
    "core.dart",
    "mojo_init.dart",
    "src/buffer.dart",
    "src/codec.dart",
    "src/data_pipe.dart",
    "src/handle.dart",
    "src/handle_watcher.dart",
    "src/message_pipe.dart",
    "src/types.dart",
  ]
  outputs = [
    "{{source_gen_dir}}/{{source_file_part}}"
  ]
}