1# Copyright (C) 2017 The Android Open Source Project
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7#      http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15import("../../../gn/perfetto.gni")
16import("../../../gn/proto_library.gni")
17
18# IPC service definitions.
19# Generates {producer,consumer}_port.ipc.{cc,h}
20perfetto_proto_library("@TYPE@") {
21  proto_generators = [
22    "ipc",
23    "cpp",
24  ]
25  sources = [
26    "consumer_port.proto",
27    "producer_port.proto",
28  ]
29  deps = [
30    # Deliberately :cpp and not :@TYPE@. In both cases (:gen and :cpp target)
31    # we want to depend on the "cpp" variants. This is because the generated
32    # .ipc.h depends on the .gen.h coming from the various common/xxx.proto.
33    "../common:cpp",
34    "../config:cpp",
35  ]
36}
37
38perfetto_proto_library("wire_protocol_@TYPE@") {
39  proto_generators = [
40    "zero",
41    "cpp",
42  ]
43  sources = [ "wire_protocol.proto" ]
44}
45