blob: 20d67fa02132b10c5bfe4d0c244fe5cf638dce27 [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",
btolsche060aaf2020-02-20 14:55:18 -080039 "third_party/mozilla",
btolsch2f2e7fa2019-03-29 16:48:49 -070040 "third_party/tinycbor",
btolsch2666dd92020-01-10 15:07:49 -080041 "tools/cddl($host_toolchain)",
Jordan Baylesa26582d2019-07-10 14:44:58 -070042 "util",
mark a. foltzc28ca402018-07-19 16:11:32 -070043 ]
btolsch2f2e7fa2019-03-29 16:48:49 -070044
45 if (use_mdns_responder) {
mark a. foltz3fe46172019-09-18 05:50:30 -070046 deps += [ "osp/impl/discovery/mdns:mdns_demo" ]
btolsch2f2e7fa2019-03-29 16:48:49 -070047 }
48
49 if (use_chromium_quic) {
50 deps += [
51 "third_party/chromium_quic",
mark a. foltz3fe46172019-09-18 05:50:30 -070052 "third_party/chromium_quic:quic_demo_server",
Jordan Bayles8af57922020-01-13 13:39:09 -080053 "third_party/chromium_quic:quic_streaming_playback_controller",
btolsch2f2e7fa2019-03-29 16:48:49 -070054 ]
55 }
mark a. foltz3fe46172019-09-18 05:50:30 -070056
57 if (use_chromium_quic && use_mdns_responder) {
58 deps += [ "osp:osp_demo" ]
59 }
Jordan Bayles21b5adc2019-10-25 12:01:20 -070060
61 if (!build_with_chromium) {
62 deps += [
btolsch2666dd92020-01-10 15:07:49 -080063 "third_party/protobuf:protoc($host_toolchain)",
Jordan Bayles21b5adc2019-10-25 12:01:20 -070064 "third_party/zlib",
65 ]
Yuri Wiitala7d2583a2019-11-22 15:04:27 -080066
btolschdd349fd2020-01-06 11:55:31 -080067 if (is_posix) {
btolsch2666dd92020-01-10 15:07:49 -080068 deps += [ "cast/test:make_crl_tests($host_toolchain)" ]
btolschdd349fd2020-01-06 11:55:31 -080069 }
70
Yuri Wiitala7d2583a2019-11-22 15:04:27 -080071 # TODO(crbug.com/openscreen/86): Build for Mac too once the mac buildbot
72 # compiler is upgraded.
Jordan Bayles8af57922020-01-13 13:39:09 -080073 if (!is_mac || force_build_standalone_receiver) {
Yuri Wiitala7d2583a2019-11-22 15:04:27 -080074 deps += [ "cast/standalone_receiver:cast_receiver" ]
75 }
Jordan Bayles21b5adc2019-10-25 12:01:20 -070076 }
mark a. foltzc28ca402018-07-19 16:11:32 -070077}
btolschb4893e62018-05-28 22:03:07 -070078
Jordan Bayles21b5adc2019-10-25 12:01:20 -070079source_set("openscreen_unittests_all") {
mark a. foltzc28ca402018-07-19 16:11:32 -070080 testonly = true
Jordan Bayles21b5adc2019-10-25 12:01:20 -070081 public_deps = [
mark a. foltzeeef1da2019-11-06 13:40:18 -080082 "cast/common:unittests",
btolsch3fb84812019-12-17 18:23:10 -080083 "cast/receiver:unittests",
mark a. foltzeeef1da2019-11-06 13:40:18 -080084 "cast/sender:unittests",
Yuri Wiitala7d2583a2019-11-22 15:04:27 -080085 "cast/streaming:unittests",
btolsch3fb84812019-12-17 18:23:10 -080086 "cast/test:unittests",
Ryan Keanebd5d0f02019-10-21 16:46:56 -070087 "discovery:unittests",
mark a. foltz3fe46172019-09-18 05:50:30 -070088 "osp:unittests",
mark a. foltz115345f2019-05-02 14:17:16 -070089 "osp/msgs:unittests",
mark a. foltz3fe46172019-09-18 05:50:30 -070090 "platform:unittests",
btolsch2f2e7fa2019-03-29 16:48:49 -070091 "third_party/abseil",
btolsch4666ed22019-04-25 15:58:07 -070092 "third_party/googletest:gtest_main",
mark a. foltz3fe46172019-09-18 05:50:30 -070093 "util:unittests",
btolsch762c4da2018-03-19 12:27:00 -070094 ]
Jordan Bayles21b5adc2019-10-25 12:01:20 -070095
96 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
109 deps = [
110 ":openscreen_unittests_all",
111 ]
112 }
btolsch762c4da2018-03-19 12:27:00 -0700113}
Ryan Keane809e0df2020-02-10 12:33:44 -0800114
115if (!build_with_chromium && is_posix) {
Jordan Bayles6b138fb2020-02-11 15:15:38 -0800116 source_set("e2e_tests_all") {
117 testonly = true
118 public_deps = [
119 "cast/common:discovery_e2e_test",
120 "third_party/googletest:gtest_main",
121 ]
122 }
123
Ryan Keane809e0df2020-02-10 12:33:44 -0800124 executable("e2e_tests") {
125 testonly = true
126 deps = [
127 ":e2e_tests_all",
128 ]
129 }
130}