blob: d91a12b8bc410a8d6dfa39ed6fcc321573e08614 [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") {
btolschdd349fd2020-01-06 11:55:31 -080019 testonly = true
20
mark a. foltzc28ca402018-07-19 16:11:32 -070021 deps = [
mark a. foltzeeef1da2019-11-06 13:40:18 -080022 "cast/common:certificate",
23 "cast/common:channel",
Ryan Keaneb7cdb6c2019-12-16 23:46:55 -080024 "cast/common:discovery",
btolsch3fb84812019-12-17 18:23:10 -080025 "cast/receiver:channel",
mark a. foltzeeef1da2019-11-06 13:40:18 -080026 "cast/sender:channel",
Yuri Wiitala7d2583a2019-11-22 15:04:27 -080027 "cast/streaming:receiver",
28 "cast/streaming:sender",
Ryan Keanecdda2f62020-01-30 12:03:25 -080029 "discovery:common",
Ryan Keanebd5d0f02019-10-21 16:46:56 -070030 "discovery:dnssd",
mark a. foltzc2291e52019-11-05 15:59:33 -080031 "discovery:mdns",
Ryan Keane697863a2019-12-26 10:31:20 -080032 "discovery:public",
mark a. foltz115345f2019-05-02 14:17:16 -070033 "osp",
34 "osp/msgs",
btolsch2f2e7fa2019-03-29 16:48:49 -070035 "platform",
btolsch2f2e7fa2019-03-29 16:48:49 -070036 "third_party/abseil",
mark a. foltz3fe46172019-09-18 05:50:30 -070037 "third_party/boringssl",
38 "third_party/jsoncpp",
btolsch2f2e7fa2019-03-29 16:48:49 -070039 "third_party/tinycbor",
btolsch2666dd92020-01-10 15:07:49 -080040 "tools/cddl($host_toolchain)",
Jordan Baylesa26582d2019-07-10 14:44:58 -070041 "util",
mark a. foltzc28ca402018-07-19 16:11:32 -070042 ]
btolsch2f2e7fa2019-03-29 16:48:49 -070043
44 if (use_mdns_responder) {
mark a. foltz3fe46172019-09-18 05:50:30 -070045 deps += [ "osp/impl/discovery/mdns:mdns_demo" ]
btolsch2f2e7fa2019-03-29 16:48:49 -070046 }
47
48 if (use_chromium_quic) {
49 deps += [
50 "third_party/chromium_quic",
mark a. foltz3fe46172019-09-18 05:50:30 -070051 "third_party/chromium_quic:quic_demo_server",
Jordan Bayles8af57922020-01-13 13:39:09 -080052 "third_party/chromium_quic:quic_streaming_playback_controller",
btolsch2f2e7fa2019-03-29 16:48:49 -070053 ]
54 }
mark a. foltz3fe46172019-09-18 05:50:30 -070055
56 if (use_chromium_quic && use_mdns_responder) {
57 deps += [ "osp:osp_demo" ]
58 }
Jordan Bayles21b5adc2019-10-25 12:01:20 -070059
60 if (!build_with_chromium) {
61 deps += [
btolsch2666dd92020-01-10 15:07:49 -080062 "third_party/protobuf:protoc($host_toolchain)",
Jordan Bayles21b5adc2019-10-25 12:01:20 -070063 "third_party/zlib",
64 ]
Yuri Wiitala7d2583a2019-11-22 15:04:27 -080065
btolschdd349fd2020-01-06 11:55:31 -080066 if (is_posix) {
btolsch2666dd92020-01-10 15:07:49 -080067 deps += [ "cast/test:make_crl_tests($host_toolchain)" ]
btolschdd349fd2020-01-06 11:55:31 -080068 }
69
Yuri Wiitala7d2583a2019-11-22 15:04:27 -080070 # TODO(crbug.com/openscreen/86): Build for Mac too once the mac buildbot
71 # compiler is upgraded.
Jordan Bayles8af57922020-01-13 13:39:09 -080072 if (!is_mac || force_build_standalone_receiver) {
Yuri Wiitala7d2583a2019-11-22 15:04:27 -080073 deps += [ "cast/standalone_receiver:cast_receiver" ]
74 }
Jordan Bayles21b5adc2019-10-25 12:01:20 -070075 }
mark a. foltzc28ca402018-07-19 16:11:32 -070076}
btolschb4893e62018-05-28 22:03:07 -070077
Jordan Bayles21b5adc2019-10-25 12:01:20 -070078source_set("openscreen_unittests_all") {
mark a. foltzc28ca402018-07-19 16:11:32 -070079 testonly = true
Jordan Bayles21b5adc2019-10-25 12:01:20 -070080 public_deps = [
mark a. foltzeeef1da2019-11-06 13:40:18 -080081 "cast/common:unittests",
btolsch3fb84812019-12-17 18:23:10 -080082 "cast/receiver:unittests",
mark a. foltzeeef1da2019-11-06 13:40:18 -080083 "cast/sender:unittests",
Yuri Wiitala7d2583a2019-11-22 15:04:27 -080084 "cast/streaming:unittests",
btolsch3fb84812019-12-17 18:23:10 -080085 "cast/test:unittests",
Ryan Keanebd5d0f02019-10-21 16:46:56 -070086 "discovery:unittests",
mark a. foltz3fe46172019-09-18 05:50:30 -070087 "osp:unittests",
mark a. foltz115345f2019-05-02 14:17:16 -070088 "osp/msgs:unittests",
mark a. foltz3fe46172019-09-18 05:50:30 -070089 "platform:unittests",
btolsch2f2e7fa2019-03-29 16:48:49 -070090 "third_party/abseil",
btolsch4666ed22019-04-25 15:58:07 -070091 "third_party/googletest:gtest_main",
mark a. foltz3fe46172019-09-18 05:50:30 -070092 "util:unittests",
btolsch762c4da2018-03-19 12:27:00 -070093 ]
Jordan Bayles21b5adc2019-10-25 12:01:20 -070094
95 if (use_mdns_responder) {
96 public_deps += [
97 "osp/impl/discovery/mdns:unittests",
98
99 # Currently this target only includes mDNS tests.
100 "osp/impl/testing:unittests",
101 ]
102 }
103}
104
105if (!build_with_chromium) {
106 executable("openscreen_unittests") {
107 testonly = true
108 deps = [
109 ":openscreen_unittests_all",
110 ]
111 }
btolsch762c4da2018-03-19 12:27:00 -0700112}
Ryan Keane809e0df2020-02-10 12:33:44 -0800113
114if (!build_with_chromium && is_posix) {
Jordan Bayles6b138fb2020-02-11 15:15:38 -0800115 source_set("e2e_tests_all") {
116 testonly = true
117 public_deps = [
118 "cast/common:discovery_e2e_test",
119 "third_party/googletest:gtest_main",
120 ]
121 }
122
Ryan Keane809e0df2020-02-10 12:33:44 -0800123 executable("e2e_tests") {
124 testonly = true
125 deps = [
126 ":e2e_tests_all",
127 ]
128 }
129}