| # 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. |
| |
| import("../../mojo_sdk.gni") |
| |
| # 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. |
| mojo_sdk_source_set("system") { |
| sources = [ |
| "buffer.h", |
| "core.h", |
| "data_pipe.h", |
| "functions.h", |
| "macros.h", |
| "message_pipe.h", |
| "system_export.h", |
| "types.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 |
| |
| # TODO(jamesr): Eliminate the need for these targets. crbug.com/438701 |
| group("for_shared_library") { |
| public_deps = [ |
| ":system", |
| ] |
| deps = [ |
| "../../platform/native:system", |
| ] |
| } |
| |
| group("for_component") { |
| public_deps = [ |
| ":system", |
| ] |
| if (is_component_build) { |
| deps = [ |
| "../../../edk/system", |
| ] |
| } |
| } |