blob: 04f9226916f35645137ea151dd84c34b346f8a9e [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",
50 "third_party/abseil",
btolsch253cbce2018-07-26 00:32:19 -070051 "//third_party/googletest:gtest_main",
btolsch762c4da2018-03-19 12:27:00 -070052 ]
53}
btolsch2f2e7fa2019-03-29 16:48:49 -070054
55if (!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
79if (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}