btolsch | 762c4da | 2018-03-19 12:27:00 -0700 | [diff] [blame] | 1 | # 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 | |
btolsch | 2f2e7fa | 2019-03-29 16:48:49 -0700 | [diff] [blame] | 5 | import("//build_overrides/build.gni") |
mark a. foltz | 115345f | 2019-05-02 14:17:16 -0700 | [diff] [blame] | 6 | import("osp/build/config/services.gni") |
btolsch | 2f2e7fa | 2019-03-29 16:48:49 -0700 | [diff] [blame] | 7 | |
Jordan Bayles | 8af5792 | 2020-01-13 13:39:09 -0800 | [diff] [blame] | 8 | declare_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. foltz | c28ca40 | 2018-07-19 16:11:32 -0700 | [diff] [blame] | 16 | # All compilable non-test targets in the repository (both executables and |
| 17 | # source_sets). |
btolsch | 9d6900c | 2018-05-30 18:22:53 -0700 | [diff] [blame] | 18 | group("gn_all") { |
btolsch | dd349fd | 2020-01-06 11:55:31 -0800 | [diff] [blame] | 19 | testonly = true |
| 20 | |
mark a. foltz | c28ca40 | 2018-07-19 16:11:32 -0700 | [diff] [blame] | 21 | deps = [ |
mark a. foltz | eeef1da | 2019-11-06 13:40:18 -0800 | [diff] [blame] | 22 | "cast/common:certificate", |
| 23 | "cast/common:channel", |
Ryan Keane | b7cdb6c | 2019-12-16 23:46:55 -0800 | [diff] [blame] | 24 | "cast/common:discovery", |
btolsch | 3fb8481 | 2019-12-17 18:23:10 -0800 | [diff] [blame] | 25 | "cast/receiver:channel", |
mark a. foltz | eeef1da | 2019-11-06 13:40:18 -0800 | [diff] [blame] | 26 | "cast/sender:channel", |
Yuri Wiitala | 7d2583a | 2019-11-22 15:04:27 -0800 | [diff] [blame] | 27 | "cast/streaming:receiver", |
| 28 | "cast/streaming:sender", |
Ryan Keane | cdda2f6 | 2020-01-30 12:03:25 -0800 | [diff] [blame] | 29 | "discovery:common", |
Ryan Keane | bd5d0f0 | 2019-10-21 16:46:56 -0700 | [diff] [blame] | 30 | "discovery:dnssd", |
mark a. foltz | c2291e5 | 2019-11-05 15:59:33 -0800 | [diff] [blame] | 31 | "discovery:mdns", |
Ryan Keane | 697863a | 2019-12-26 10:31:20 -0800 | [diff] [blame] | 32 | "discovery:public", |
mark a. foltz | 115345f | 2019-05-02 14:17:16 -0700 | [diff] [blame] | 33 | "osp", |
| 34 | "osp/msgs", |
btolsch | 2f2e7fa | 2019-03-29 16:48:49 -0700 | [diff] [blame] | 35 | "platform", |
btolsch | 2f2e7fa | 2019-03-29 16:48:49 -0700 | [diff] [blame] | 36 | "third_party/abseil", |
mark a. foltz | 3fe4617 | 2019-09-18 05:50:30 -0700 | [diff] [blame] | 37 | "third_party/boringssl", |
| 38 | "third_party/jsoncpp", |
btolsch | 2f2e7fa | 2019-03-29 16:48:49 -0700 | [diff] [blame] | 39 | "third_party/tinycbor", |
btolsch | 2666dd9 | 2020-01-10 15:07:49 -0800 | [diff] [blame] | 40 | "tools/cddl($host_toolchain)", |
Jordan Bayles | a26582d | 2019-07-10 14:44:58 -0700 | [diff] [blame] | 41 | "util", |
mark a. foltz | c28ca40 | 2018-07-19 16:11:32 -0700 | [diff] [blame] | 42 | ] |
btolsch | 2f2e7fa | 2019-03-29 16:48:49 -0700 | [diff] [blame] | 43 | |
| 44 | if (use_mdns_responder) { |
mark a. foltz | 3fe4617 | 2019-09-18 05:50:30 -0700 | [diff] [blame] | 45 | deps += [ "osp/impl/discovery/mdns:mdns_demo" ] |
btolsch | 2f2e7fa | 2019-03-29 16:48:49 -0700 | [diff] [blame] | 46 | } |
| 47 | |
| 48 | if (use_chromium_quic) { |
| 49 | deps += [ |
| 50 | "third_party/chromium_quic", |
mark a. foltz | 3fe4617 | 2019-09-18 05:50:30 -0700 | [diff] [blame] | 51 | "third_party/chromium_quic:quic_demo_server", |
Jordan Bayles | 8af5792 | 2020-01-13 13:39:09 -0800 | [diff] [blame] | 52 | "third_party/chromium_quic:quic_streaming_playback_controller", |
btolsch | 2f2e7fa | 2019-03-29 16:48:49 -0700 | [diff] [blame] | 53 | ] |
| 54 | } |
mark a. foltz | 3fe4617 | 2019-09-18 05:50:30 -0700 | [diff] [blame] | 55 | |
| 56 | if (use_chromium_quic && use_mdns_responder) { |
| 57 | deps += [ "osp:osp_demo" ] |
| 58 | } |
Jordan Bayles | 21b5adc | 2019-10-25 12:01:20 -0700 | [diff] [blame] | 59 | |
| 60 | if (!build_with_chromium) { |
| 61 | deps += [ |
btolsch | 2666dd9 | 2020-01-10 15:07:49 -0800 | [diff] [blame] | 62 | "third_party/protobuf:protoc($host_toolchain)", |
Jordan Bayles | 21b5adc | 2019-10-25 12:01:20 -0700 | [diff] [blame] | 63 | "third_party/zlib", |
| 64 | ] |
Yuri Wiitala | 7d2583a | 2019-11-22 15:04:27 -0800 | [diff] [blame] | 65 | |
btolsch | dd349fd | 2020-01-06 11:55:31 -0800 | [diff] [blame] | 66 | if (is_posix) { |
btolsch | 2666dd9 | 2020-01-10 15:07:49 -0800 | [diff] [blame] | 67 | deps += [ "cast/test:make_crl_tests($host_toolchain)" ] |
btolsch | dd349fd | 2020-01-06 11:55:31 -0800 | [diff] [blame] | 68 | } |
| 69 | |
Yuri Wiitala | 7d2583a | 2019-11-22 15:04:27 -0800 | [diff] [blame] | 70 | # TODO(crbug.com/openscreen/86): Build for Mac too once the mac buildbot |
| 71 | # compiler is upgraded. |
Jordan Bayles | 8af5792 | 2020-01-13 13:39:09 -0800 | [diff] [blame] | 72 | if (!is_mac || force_build_standalone_receiver) { |
Yuri Wiitala | 7d2583a | 2019-11-22 15:04:27 -0800 | [diff] [blame] | 73 | deps += [ "cast/standalone_receiver:cast_receiver" ] |
| 74 | } |
Jordan Bayles | 21b5adc | 2019-10-25 12:01:20 -0700 | [diff] [blame] | 75 | } |
mark a. foltz | c28ca40 | 2018-07-19 16:11:32 -0700 | [diff] [blame] | 76 | } |
btolsch | b4893e6 | 2018-05-28 22:03:07 -0700 | [diff] [blame] | 77 | |
Jordan Bayles | 21b5adc | 2019-10-25 12:01:20 -0700 | [diff] [blame] | 78 | source_set("openscreen_unittests_all") { |
mark a. foltz | c28ca40 | 2018-07-19 16:11:32 -0700 | [diff] [blame] | 79 | testonly = true |
Jordan Bayles | 21b5adc | 2019-10-25 12:01:20 -0700 | [diff] [blame] | 80 | public_deps = [ |
mark a. foltz | eeef1da | 2019-11-06 13:40:18 -0800 | [diff] [blame] | 81 | "cast/common:unittests", |
btolsch | 3fb8481 | 2019-12-17 18:23:10 -0800 | [diff] [blame] | 82 | "cast/receiver:unittests", |
mark a. foltz | eeef1da | 2019-11-06 13:40:18 -0800 | [diff] [blame] | 83 | "cast/sender:unittests", |
Yuri Wiitala | 7d2583a | 2019-11-22 15:04:27 -0800 | [diff] [blame] | 84 | "cast/streaming:unittests", |
btolsch | 3fb8481 | 2019-12-17 18:23:10 -0800 | [diff] [blame] | 85 | "cast/test:unittests", |
Ryan Keane | bd5d0f0 | 2019-10-21 16:46:56 -0700 | [diff] [blame] | 86 | "discovery:unittests", |
mark a. foltz | 3fe4617 | 2019-09-18 05:50:30 -0700 | [diff] [blame] | 87 | "osp:unittests", |
mark a. foltz | 115345f | 2019-05-02 14:17:16 -0700 | [diff] [blame] | 88 | "osp/msgs:unittests", |
mark a. foltz | 3fe4617 | 2019-09-18 05:50:30 -0700 | [diff] [blame] | 89 | "platform:unittests", |
btolsch | 2f2e7fa | 2019-03-29 16:48:49 -0700 | [diff] [blame] | 90 | "third_party/abseil", |
btolsch | 4666ed2 | 2019-04-25 15:58:07 -0700 | [diff] [blame] | 91 | "third_party/googletest:gtest_main", |
mark a. foltz | 3fe4617 | 2019-09-18 05:50:30 -0700 | [diff] [blame] | 92 | "util:unittests", |
btolsch | 762c4da | 2018-03-19 12:27:00 -0700 | [diff] [blame] | 93 | ] |
Jordan Bayles | 21b5adc | 2019-10-25 12:01:20 -0700 | [diff] [blame] | 94 | |
| 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 | |
| 105 | if (!build_with_chromium) { |
| 106 | executable("openscreen_unittests") { |
| 107 | testonly = true |
| 108 | deps = [ |
| 109 | ":openscreen_unittests_all", |
| 110 | ] |
| 111 | } |
btolsch | 762c4da | 2018-03-19 12:27:00 -0700 | [diff] [blame] | 112 | } |
Ryan Keane | 809e0df | 2020-02-10 12:33:44 -0800 | [diff] [blame] | 113 | |
| 114 | if (!build_with_chromium && is_posix) { |
Jordan Bayles | 6b138fb | 2020-02-11 15:15:38 -0800 | [diff] [blame^] | 115 | 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 Keane | 809e0df | 2020-02-10 12:33:44 -0800 | [diff] [blame] | 123 | executable("e2e_tests") { |
| 124 | testonly = true |
| 125 | deps = [ |
| 126 | ":e2e_tests_all", |
| 127 | ] |
| 128 | } |
| 129 | } |