| # Copyright (C) 2017 The Android Open Source Project | 
 | # | 
 | # Licensed under the Apache License, Version 2.0 (the "License"); | 
 | # you may not use this file except in compliance with the License. | 
 | # You may obtain a copy of the License at | 
 | # | 
 | #      http://www.apache.org/licenses/LICENSE-2.0 | 
 | # | 
 | # Unless required by applicable law or agreed to in writing, software | 
 | # distributed under the License is distributed on an "AS IS" BASIS, | 
 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | 
 | # See the License for the specific language governing permissions and | 
 | # limitations under the License. | 
 |  | 
 | import("perfetto.gni") | 
 |  | 
 | # Used in production targets (i.e. testonly == false) for the FRIEND_TEST_* | 
 | # macros. | 
 | group("gtest_prod_config") { | 
 |   if (!build_with_chromium) { | 
 |     public_configs = [ "//buildtools:googletest_prod_config" ] | 
 |   } else { | 
 |     public_configs = [ ":gtest_config" ] | 
 |   } | 
 | } | 
 |  | 
 | config("gtest_config") { | 
 |   if (build_with_chromium) { | 
 |     include_dirs = [ "//testing/gtest/include" ] | 
 |   } | 
 | } | 
 |  | 
 | group("gtest_deps") { | 
 |   testonly = true | 
 |  | 
 |   public_configs = [ ":gtest_config" ] | 
 |  | 
 |   if (!build_with_chromium) { | 
 |     public_deps = [ | 
 |       "//buildtools:gmock", | 
 |       "//buildtools:gtest", | 
 |       "//buildtools:gtest_main", | 
 |     ] | 
 |   } else { | 
 |     public_deps = [ | 
 |       "//testing/gmock", | 
 |       "//testing/gtest", | 
 |       "//testing/gtest:gtest_main", | 
 |     ] | 
 |   } | 
 | } | 
 |  | 
 | # protoc compiler library, for building protoc plugins on the host. | 
 | if (current_toolchain == host_toolchain) { | 
 |   group("protoc_lib_deps") { | 
 |     if (!build_with_chromium) { | 
 |       public_deps = [ | 
 |         "//buildtools:protoc_lib", | 
 |       ] | 
 |     } else { | 
 |       public_deps = [ | 
 |         "//third_party/protobuf:protoc_lib", | 
 |       ] | 
 |     } | 
 |   } | 
 | } | 
 |  | 
 | group("protobuf_full_deps") { | 
 |   if (!build_with_chromium) { | 
 |     public_deps = [ | 
 |       "//buildtools:protobuf_full", | 
 |     ] | 
 |   } else { | 
 |     public_deps = [ | 
 |       "//third_party/protobuf:protobuf_full", | 
 |     ] | 
 |   } | 
 | } | 
 |  | 
 | # All targets should depend on this target to inherit the right flags and | 
 | # include directories. | 
 | group("default_deps") { | 
 |   public_configs = [ ":default_config" ] | 
 |   if (!build_with_chromium) { | 
 |     public_deps = [ | 
 |       "//gn/standalone/libc++:deps", | 
 |       "//gn/standalone/sanitizers:deps", | 
 |     ] | 
 |   } else { | 
 |     public_deps = [ | 
 |       "//build/config:exe_and_shlib_deps", | 
 |     ] | 
 |   } | 
 | } | 
 |  | 
 | config("default_config") { | 
 |   include_dirs = [ | 
 |     "..", | 
 |     "../include", | 
 |   ] | 
 | } |