blob: a7cea6f519ed6470977bd75f9f3b461bace34279 [file] [log] [blame]
btolsch762c4da2018-03-19 12:27:00 -07001# 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
btolsch2f2e7fa2019-03-29 16:48:49 -07005import("//build_overrides/build.gni")
6import("build/config/services.gni")
7
8config("root_config_overrides") {
9 if (build_with_chromium) {
10 include_dirs = [ "." ]
11 }
12}
13
mark a. foltzc28ca402018-07-19 16:11:32 -070014# All compilable non-test targets in the repository (both executables and
15# source_sets).
btolsch9d6900c2018-05-30 18:22:53 -070016group("gn_all") {
mark a. foltzc28ca402018-07-19 16:11:32 -070017 deps = [
btolsch2f2e7fa2019-03-29 16:48:49 -070018 "api",
19 "base",
20 "msgs",
21 "platform",
22 "sample:hello",
23 "third_party/abseil",
24 "third_party/tinycbor",
25 "tools/cddl",
mark a. foltzc28ca402018-07-19 16:11:32 -070026 ]
btolsch2f2e7fa2019-03-29 16:48:49 -070027
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. foltzc28ca402018-07-19 16:11:32 -070039}
btolschb4893e62018-05-28 22:03:07 -070040
btolsch2f2e7fa2019-03-29 16:48:49 -070041executable("openscreen_unittests") {
mark a. foltzc28ca402018-07-19 16:11:32 -070042 testonly = true
btolschb4893e62018-05-28 22:03:07 -070043 deps = [
btolsch2f2e7fa2019-03-29 16:48:49 -070044 "api:api_unittests",
45 "base:base_unittests",
46 "discovery/mdns:mdns_unittests",
47 "msgs:unittests",
48 "platform:platform_unittests",
49 "sample:hello_unittests",
Yuri Wiitalae55f8ac2019-03-30 17:16:43 -070050 "streaming/cast:cast_unittests",
btolsch2f2e7fa2019-03-29 16:48:49 -070051 "third_party/abseil",
btolsch253cbce2018-07-26 00:32:19 -070052 "//third_party/googletest:gtest_main",
btolsch762c4da2018-03-19 12:27:00 -070053 ]
54}
btolsch2f2e7fa2019-03-29 16:48:49 -070055
56if (!build_with_chromium) {
57 # TODO(btolsch): This is to keep the openscreen bots happy with a `unittests`
58 # target and executable. Remove this after the bot recipe can be updated.
59 group("unittests") {
60 testonly = true
61 deps = [
62 ":openscreen_unittests",
63 ]
64 }
65
66 copy("unittests_rename") {
67 testonly = true
68 sources = [
69 "$root_out_dir/openscreen_unittests",
70 ]
71 outputs = [
72 "$root_out_dir/unittests",
73 ]
74 deps = [
75 ":openscreen_unittests",
76 ]
77 }
78}
79
80if (use_chromium_quic && use_mdns_responder) {
81 executable("demo") {
82 sources = [
83 "demo/demo.cc",
84 ]
85
86 deps = [
87 "api:api_with_chromium_quic",
88 "base",
89 "discovery/mdns",
90 "platform",
91 ]
92 }
93}