blob: bb698dc7d478b232cd4979b8f559fac8f497973e [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")
mark a. foltz115345f2019-05-02 14:17:16 -07006import("osp/build/config/services.gni")
btolsch2f2e7fa2019-03-29 16:48:49 -07007
Jordan Bayles8af57922020-01-13 13:39:09 -08008declare_args() {
9 # Set to true to force building the standalone receiver on Mac. It's currently
10 # disabled due to build bot struggles, but works fine on local, recent clang
11 # installations.
12 # TODO(crbug.com/openscreen/86): Remove when the Mac bots have been upgraded.
13 force_build_standalone_receiver = false
14}
15
mark a. foltzc28ca402018-07-19 16:11:32 -070016# All compilable non-test targets in the repository (both executables and
17# source_sets).
btolsch9d6900c2018-05-30 18:22:53 -070018group("gn_all") {
mark a. foltzc28ca402018-07-19 16:11:32 -070019 deps = [
mark a. foltzeeef1da2019-11-06 13:40:18 -080020 "cast/common:certificate",
21 "cast/common:channel",
btolsch9931e7a2020-02-26 15:50:20 -080022 "cast/common:public",
btolsch3fb84812019-12-17 18:23:10 -080023 "cast/receiver:channel",
mark a. foltzeeef1da2019-11-06 13:40:18 -080024 "cast/sender:channel",
Yuri Wiitala7d2583a2019-11-22 15:04:27 -080025 "cast/streaming:receiver",
26 "cast/streaming:sender",
Ryan Keanecdda2f62020-01-30 12:03:25 -080027 "discovery:common",
Ryan Keanebd5d0f02019-10-21 16:46:56 -070028 "discovery:dnssd",
mark a. foltzc2291e52019-11-05 15:59:33 -080029 "discovery:mdns",
Ryan Keane697863a2019-12-26 10:31:20 -080030 "discovery:public",
mark a. foltz115345f2019-05-02 14:17:16 -070031 "osp",
32 "osp/msgs",
btolsch2f2e7fa2019-03-29 16:48:49 -070033 "platform",
btolsch2f2e7fa2019-03-29 16:48:49 -070034 "third_party/abseil",
mark a. foltz3fe46172019-09-18 05:50:30 -070035 "third_party/boringssl",
36 "third_party/jsoncpp",
btolsche060aaf2020-02-20 14:55:18 -080037 "third_party/mozilla",
btolsch2f2e7fa2019-03-29 16:48:49 -070038 "third_party/tinycbor",
btolsch2666dd92020-01-10 15:07:49 -080039 "tools/cddl($host_toolchain)",
Jordan Baylesa26582d2019-07-10 14:44:58 -070040 "util",
mark a. foltzc28ca402018-07-19 16:11:32 -070041 ]
btolsch2f2e7fa2019-03-29 16:48:49 -070042
43 if (use_mdns_responder) {
mark a. foltz3fe46172019-09-18 05:50:30 -070044 deps += [ "osp/impl/discovery/mdns:mdns_demo" ]
btolsch2f2e7fa2019-03-29 16:48:49 -070045 }
46
47 if (use_chromium_quic) {
48 deps += [
49 "third_party/chromium_quic",
mark a. foltz3fe46172019-09-18 05:50:30 -070050 "third_party/chromium_quic:quic_demo_server",
Jordan Bayles8af57922020-01-13 13:39:09 -080051 "third_party/chromium_quic:quic_streaming_playback_controller",
btolsch2f2e7fa2019-03-29 16:48:49 -070052 ]
53 }
mark a. foltz3fe46172019-09-18 05:50:30 -070054
55 if (use_chromium_quic && use_mdns_responder) {
56 deps += [ "osp:osp_demo" ]
57 }
Jordan Bayles21b5adc2019-10-25 12:01:20 -070058
59 if (!build_with_chromium) {
60 deps += [
btolsch2666dd92020-01-10 15:07:49 -080061 "third_party/protobuf:protoc($host_toolchain)",
Jordan Bayles21b5adc2019-10-25 12:01:20 -070062 "third_party/zlib",
63 ]
Yuri Wiitala7d2583a2019-11-22 15:04:27 -080064
65 # TODO(crbug.com/openscreen/86): Build for Mac too once the mac buildbot
66 # compiler is upgraded.
Jordan Bayles8af57922020-01-13 13:39:09 -080067 if (!is_mac || force_build_standalone_receiver) {
Yuri Wiitala31d56782020-03-06 16:00:19 -080068 deps += [
69 "cast/standalone_receiver:cast_receiver",
70 "cast/standalone_sender:cast_sender",
71 ]
Yuri Wiitala7d2583a2019-11-22 15:04:27 -080072 }
Jordan Bayles21b5adc2019-10-25 12:01:20 -070073 }
mark a. foltzc28ca402018-07-19 16:11:32 -070074}
btolschb4893e62018-05-28 22:03:07 -070075
Jordan Bayles21b5adc2019-10-25 12:01:20 -070076source_set("openscreen_unittests_all") {
mark a. foltzc28ca402018-07-19 16:11:32 -070077 testonly = true
Jordan Bayles21b5adc2019-10-25 12:01:20 -070078 public_deps = [
mark a. foltzeeef1da2019-11-06 13:40:18 -080079 "cast/common:unittests",
btolsch3fb84812019-12-17 18:23:10 -080080 "cast/receiver:unittests",
mark a. foltzeeef1da2019-11-06 13:40:18 -080081 "cast/sender:unittests",
Yuri Wiitala7d2583a2019-11-22 15:04:27 -080082 "cast/streaming:unittests",
btolsch3fb84812019-12-17 18:23:10 -080083 "cast/test:unittests",
Ryan Keanebd5d0f02019-10-21 16:46:56 -070084 "discovery:unittests",
mark a. foltz3fe46172019-09-18 05:50:30 -070085 "osp:unittests",
mark a. foltz115345f2019-05-02 14:17:16 -070086 "osp/msgs:unittests",
mark a. foltz3fe46172019-09-18 05:50:30 -070087 "platform:unittests",
btolsch2f2e7fa2019-03-29 16:48:49 -070088 "third_party/abseil",
mark a. foltz3fe46172019-09-18 05:50:30 -070089 "util:unittests",
btolsch762c4da2018-03-19 12:27:00 -070090 ]
Jordan Bayles21b5adc2019-10-25 12:01:20 -070091
Ryan Keane3c396112020-04-28 14:24:43 -070092 if (!build_with_chromium && is_posix) {
93 public_deps += [ "cast/test:make_crl_tests($host_toolchain)" ]
94 }
95
Jordan Bayles21b5adc2019-10-25 12:01:20 -070096 if (use_mdns_responder) {
97 public_deps += [
98 "osp/impl/discovery/mdns:unittests",
99
100 # Currently this target only includes mDNS tests.
101 "osp/impl/testing:unittests",
102 ]
103 }
104}
105
106if (!build_with_chromium) {
107 executable("openscreen_unittests") {
108 testonly = true
Jordan Baylesf318b722020-06-23 15:32:13 -0700109 deps = [
110 ":openscreen_unittests_all",
111 "test:test_main",
112 ]
Jordan Bayles21b5adc2019-10-25 12:01:20 -0700113 }
btolsch762c4da2018-03-19 12:27:00 -0700114}
Ryan Keane809e0df2020-02-10 12:33:44 -0800115
116if (!build_with_chromium && is_posix) {
Jordan Bayles6b138fb2020-02-11 15:15:38 -0800117 source_set("e2e_tests_all") {
118 testonly = true
119 public_deps = [
120 "cast/common:discovery_e2e_test",
Jordan Bayles32755932020-04-27 12:02:29 -0700121 "cast/standalone_receiver:e2e_tests",
btolsch1aa88262020-03-16 18:06:20 -0700122 "cast/test:e2e_tests",
Ryan Keane3c396112020-04-28 14:24:43 -0700123 "cast/test:make_crl_tests($host_toolchain)",
Jordan Bayles6b138fb2020-02-11 15:15:38 -0800124 ]
125 }
126
Ryan Keane809e0df2020-02-10 12:33:44 -0800127 executable("e2e_tests") {
128 testonly = true
Jordan Baylesf318b722020-06-23 15:32:13 -0700129 deps = [
130 ":e2e_tests_all",
131 "test:test_main",
132 ]
Ryan Keane809e0df2020-02-10 12:33:44 -0800133 }
134}