blob: 41b52178cf814b45a70d1fb66d2639dd4632d5f7 [file] [log] [blame]
Oystein Eftevaagdd727e42017-12-05 08:49:55 -08001# 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("perfetto.gni")
16
Primiano Tucci4f9b6d72017-12-05 20:59:16 +000017# Used in production targets (i.e. testonly == false) for the FRIEND_TEST_*
18# macros.
19group("gtest_prod_config") {
20 if (!build_with_chromium) {
21 public_configs = [ "//buildtools:googletest_prod_config" ]
22 } else {
23 public_configs = [ ":gtest_config" ]
24 }
25}
26
27config("gtest_config") {
28 if (build_with_chromium) {
29 include_dirs = [ "//testing/gtest/include" ]
30 }
31}
32
Oystein Eftevaagdd727e42017-12-05 08:49:55 -080033group("gtest_deps") {
34 testonly = true
35
Primiano Tucci4f9b6d72017-12-05 20:59:16 +000036 public_configs = [ ":gtest_config" ]
37
Oystein Eftevaagdd727e42017-12-05 08:49:55 -080038 if (!build_with_chromium) {
39 public_deps = [
40 "//buildtools:gmock",
41 "//buildtools:gtest",
42 "//buildtools:gtest_main",
43 ]
44 } else {
45 public_deps = [
46 "//testing/gmock",
47 "//testing/gtest",
48 "//testing/gtest:gtest_main",
49 ]
50 }
51}
52
Primiano Tucci4f9b6d72017-12-05 20:59:16 +000053# protoc compiler library, for building protoc plugins on the host.
54if (current_toolchain == host_toolchain) {
55 group("protoc_lib_deps") {
56 if (!build_with_chromium) {
Oystein Eftevaagdd727e42017-12-05 08:49:55 -080057 public_deps = [
58 "//buildtools:protoc_lib",
59 ]
Primiano Tucci4f9b6d72017-12-05 20:59:16 +000060 } else {
61 public_deps = [
62 "//third_party/protobuf:protoc_lib",
63 ]
Oystein Eftevaagdd727e42017-12-05 08:49:55 -080064 }
Oystein Eftevaagdd727e42017-12-05 08:49:55 -080065 }
66}
67
68group("protobuf_full_deps") {
69 if (!build_with_chromium) {
70 public_deps = [
71 "//buildtools:protobuf_full",
72 ]
73 } else {
74 public_deps = [
75 "//third_party/protobuf:protobuf_full",
76 ]
77 }
78}
79
Primiano Tucci4f9b6d72017-12-05 20:59:16 +000080# All targets should depend on this target to inherit the right flags and
81# include directories.
Oystein Eftevaagdd727e42017-12-05 08:49:55 -080082group("default_deps") {
Primiano Tucci4f9b6d72017-12-05 20:59:16 +000083 public_configs = [ ":default_config" ]
Oystein Eftevaagdd727e42017-12-05 08:49:55 -080084 if (!build_with_chromium) {
85 public_deps = [
Primiano Tucci7a40e4d2017-12-06 09:51:09 +000086 "//gn/standalone/libc++:deps",
87 "//gn/standalone/sanitizers:deps",
Oystein Eftevaagdd727e42017-12-05 08:49:55 -080088 ]
89 }
90}
Primiano Tucci4f9b6d72017-12-05 20:59:16 +000091
92config("default_config") {
93 include_dirs = [
94 "..",
95 "../include",
96 ]
97}