btolsch | 762c4da | 2018-03-19 12:27:00 -0700 | [diff] [blame] | 1 | # Copyright 2018 The Chromium Authors. All rights reserved. |
| 2 | # Use of this source code is governed by a BSD-style license that can be |
| 3 | # found in the LICENSE file. |
| 4 | |
btolsch | 2f2e7fa | 2019-03-29 16:48:49 -0700 | [diff] [blame^] | 5 | import("//build_overrides/build.gni") |
| 6 | import("build/config/services.gni") |
| 7 | |
| 8 | config("root_config_overrides") { |
| 9 | if (build_with_chromium) { |
| 10 | include_dirs = [ "." ] |
| 11 | } |
| 12 | } |
| 13 | |
mark a. foltz | c28ca40 | 2018-07-19 16:11:32 -0700 | [diff] [blame] | 14 | # All compilable non-test targets in the repository (both executables and |
| 15 | # source_sets). |
btolsch | 9d6900c | 2018-05-30 18:22:53 -0700 | [diff] [blame] | 16 | group("gn_all") { |
mark a. foltz | c28ca40 | 2018-07-19 16:11:32 -0700 | [diff] [blame] | 17 | deps = [ |
btolsch | 2f2e7fa | 2019-03-29 16:48:49 -0700 | [diff] [blame^] | 18 | "api", |
| 19 | "base", |
| 20 | "msgs", |
| 21 | "platform", |
| 22 | "sample:hello", |
| 23 | "third_party/abseil", |
| 24 | "third_party/tinycbor", |
| 25 | "tools/cddl", |
mark a. foltz | c28ca40 | 2018-07-19 16:11:32 -0700 | [diff] [blame] | 26 | ] |
btolsch | 2f2e7fa | 2019-03-29 16:48:49 -0700 | [diff] [blame^] | 27 | |
| 28 | if (use_mdns_responder) { |
| 29 | deps += [ "discovery/mdns:embedder_demo" ] |
| 30 | } |
| 31 | |
| 32 | if (use_chromium_quic) { |
| 33 | deps += [ |
| 34 | "third_party/chromium_quic", |
| 35 | "third_party/chromium_quic:demo_client", |
| 36 | "third_party/chromium_quic:demo_server", |
| 37 | ] |
| 38 | } |
mark a. foltz | c28ca40 | 2018-07-19 16:11:32 -0700 | [diff] [blame] | 39 | } |
btolsch | b4893e6 | 2018-05-28 22:03:07 -0700 | [diff] [blame] | 40 | |
btolsch | 2f2e7fa | 2019-03-29 16:48:49 -0700 | [diff] [blame^] | 41 | executable("openscreen_unittests") { |
mark a. foltz | c28ca40 | 2018-07-19 16:11:32 -0700 | [diff] [blame] | 42 | testonly = true |
btolsch | b4893e6 | 2018-05-28 22:03:07 -0700 | [diff] [blame] | 43 | deps = [ |
btolsch | 2f2e7fa | 2019-03-29 16:48:49 -0700 | [diff] [blame^] | 44 | "api:api_unittests", |
| 45 | "base:base_unittests", |
| 46 | "discovery/mdns:mdns_unittests", |
| 47 | "msgs:unittests", |
| 48 | "platform:platform_unittests", |
| 49 | "sample:hello_unittests", |
| 50 | "third_party/abseil", |
btolsch | 253cbce | 2018-07-26 00:32:19 -0700 | [diff] [blame] | 51 | "//third_party/googletest:gtest_main", |
btolsch | 762c4da | 2018-03-19 12:27:00 -0700 | [diff] [blame] | 52 | ] |
| 53 | } |
btolsch | 2f2e7fa | 2019-03-29 16:48:49 -0700 | [diff] [blame^] | 54 | |
| 55 | if (!build_with_chromium) { |
| 56 | # TODO(btolsch): This is to keep the openscreen bots happy with a `unittests` |
| 57 | # target and executable. Remove this after the bot recipe can be updated. |
| 58 | group("unittests") { |
| 59 | testonly = true |
| 60 | deps = [ |
| 61 | ":openscreen_unittests", |
| 62 | ] |
| 63 | } |
| 64 | |
| 65 | copy("unittests_rename") { |
| 66 | testonly = true |
| 67 | sources = [ |
| 68 | "$root_out_dir/openscreen_unittests", |
| 69 | ] |
| 70 | outputs = [ |
| 71 | "$root_out_dir/unittests", |
| 72 | ] |
| 73 | deps = [ |
| 74 | ":openscreen_unittests", |
| 75 | ] |
| 76 | } |
| 77 | } |
| 78 | |
| 79 | if (use_chromium_quic && use_mdns_responder) { |
| 80 | executable("demo") { |
| 81 | sources = [ |
| 82 | "demo/demo.cc", |
| 83 | ] |
| 84 | |
| 85 | deps = [ |
| 86 | "api:api_with_chromium_quic", |
| 87 | "base", |
| 88 | "discovery/mdns", |
| 89 | "platform", |
| 90 | ] |
| 91 | } |
| 92 | } |