summaryrefslogtreecommitdiffstats
path: root/mojo/public/c/system/BUILD.gn
blob: c2f149b90acf853f13500cba7842b7b0ddedd3ee (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
# 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.

# Depend on this target to use the types etc defined in the system without
# linking against a specific implementation of the system. To link against a
# particular implementation, use the :for_component or
# :for_shared_library targets, depending on the type of target you are.
source_set("system") {
  sources = [
    "buffer.h",
    "core.h",
    "data_pipe.h",
    "functions.h",
    "macros.h",
    "message_pipe.h",
    "system_export.h",
    "types.h",
    "wait_set.h",
  ]
}

# In an is_component_build build, everything can link against //mojo/edk/system
# because it is built as a shared library. However, in a static build,
# //mojo/edk/system is linked into an executable (e.g., mojo_shell), and must be
# injected into other shared libraries (i.e., Mojo Apps) that need the mojo
# system API.
#
# For component targets, add //mojo/public/c/system:for_component to your deps
# section.
#
# For shared_library targets (e.g., a Mojo App), add
# //mojo/public/c/system:for_shared_library to your deps

group("for_shared_library") {
  public_deps = [
    ":system",
  ]
  if (is_component_build) {
    deps = [
      "//mojo/edk/system",
    ]
  } else {
    deps = [
      "../../platform/native:system",
    ]
  }
}

group("for_component") {
  public_deps = [
    ":system",
  ]
  if (is_component_build) {
    deps = [
      "//mojo/edk/system",
    ]
  }
}