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", |
btolsch | 9931e7a | 2020-02-26 15:50:20 -0800 | [diff] [blame] | 24 | "cast/common:public", |
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 | e060aaf | 2020-02-20 14:55:18 -0800 | [diff] [blame] | 39 | "third_party/mozilla", |
btolsch | 2f2e7fa | 2019-03-29 16:48:49 -0700 | [diff] [blame] | 40 | "third_party/tinycbor", |
btolsch | 2666dd9 | 2020-01-10 15:07:49 -0800 | [diff] [blame] | 41 | "tools/cddl($host_toolchain)", |
Jordan Bayles | a26582d | 2019-07-10 14:44:58 -0700 | [diff] [blame] | 42 | "util", |
mark a. foltz | c28ca40 | 2018-07-19 16:11:32 -0700 | [diff] [blame] | 43 | ] |
btolsch | 2f2e7fa | 2019-03-29 16:48:49 -0700 | [diff] [blame] | 44 | |
| 45 | if (use_mdns_responder) { |
mark a. foltz | 3fe4617 | 2019-09-18 05:50:30 -0700 | [diff] [blame] | 46 | deps += [ "osp/impl/discovery/mdns:mdns_demo" ] |
btolsch | 2f2e7fa | 2019-03-29 16:48:49 -0700 | [diff] [blame] | 47 | } |
| 48 | |
| 49 | if (use_chromium_quic) { |
| 50 | deps += [ |
| 51 | "third_party/chromium_quic", |
mark a. foltz | 3fe4617 | 2019-09-18 05:50:30 -0700 | [diff] [blame] | 52 | "third_party/chromium_quic:quic_demo_server", |
Jordan Bayles | 8af5792 | 2020-01-13 13:39:09 -0800 | [diff] [blame] | 53 | "third_party/chromium_quic:quic_streaming_playback_controller", |
btolsch | 2f2e7fa | 2019-03-29 16:48:49 -0700 | [diff] [blame] | 54 | ] |
| 55 | } |
mark a. foltz | 3fe4617 | 2019-09-18 05:50:30 -0700 | [diff] [blame] | 56 | |
| 57 | if (use_chromium_quic && use_mdns_responder) { |
| 58 | deps += [ "osp:osp_demo" ] |
| 59 | } |
Jordan Bayles | 21b5adc | 2019-10-25 12:01:20 -0700 | [diff] [blame] | 60 | |
| 61 | if (!build_with_chromium) { |
| 62 | deps += [ |
btolsch | 2666dd9 | 2020-01-10 15:07:49 -0800 | [diff] [blame] | 63 | "third_party/protobuf:protoc($host_toolchain)", |
Jordan Bayles | 21b5adc | 2019-10-25 12:01:20 -0700 | [diff] [blame] | 64 | "third_party/zlib", |
| 65 | ] |
Yuri Wiitala | 7d2583a | 2019-11-22 15:04:27 -0800 | [diff] [blame] | 66 | |
btolsch | dd349fd | 2020-01-06 11:55:31 -0800 | [diff] [blame] | 67 | if (is_posix) { |
btolsch | 2666dd9 | 2020-01-10 15:07:49 -0800 | [diff] [blame] | 68 | deps += [ "cast/test:make_crl_tests($host_toolchain)" ] |
btolsch | dd349fd | 2020-01-06 11:55:31 -0800 | [diff] [blame] | 69 | } |
| 70 | |
Yuri Wiitala | 7d2583a | 2019-11-22 15:04:27 -0800 | [diff] [blame] | 71 | # TODO(crbug.com/openscreen/86): Build for Mac too once the mac buildbot |
| 72 | # compiler is upgraded. |
Jordan Bayles | 8af5792 | 2020-01-13 13:39:09 -0800 | [diff] [blame] | 73 | if (!is_mac || force_build_standalone_receiver) { |
Yuri Wiitala | 31d5678 | 2020-03-06 16:00:19 -0800 | [diff] [blame] | 74 | deps += [ |
| 75 | "cast/standalone_receiver:cast_receiver", |
| 76 | "cast/standalone_sender:cast_sender", |
| 77 | ] |
Yuri Wiitala | 7d2583a | 2019-11-22 15:04:27 -0800 | [diff] [blame] | 78 | } |
Jordan Bayles | 21b5adc | 2019-10-25 12:01:20 -0700 | [diff] [blame] | 79 | } |
mark a. foltz | c28ca40 | 2018-07-19 16:11:32 -0700 | [diff] [blame] | 80 | } |
btolsch | b4893e6 | 2018-05-28 22:03:07 -0700 | [diff] [blame] | 81 | |
Jordan Bayles | 21b5adc | 2019-10-25 12:01:20 -0700 | [diff] [blame] | 82 | source_set("openscreen_unittests_all") { |
mark a. foltz | c28ca40 | 2018-07-19 16:11:32 -0700 | [diff] [blame] | 83 | testonly = true |
Jordan Bayles | 21b5adc | 2019-10-25 12:01:20 -0700 | [diff] [blame] | 84 | public_deps = [ |
mark a. foltz | eeef1da | 2019-11-06 13:40:18 -0800 | [diff] [blame] | 85 | "cast/common:unittests", |
btolsch | 3fb8481 | 2019-12-17 18:23:10 -0800 | [diff] [blame] | 86 | "cast/receiver:unittests", |
mark a. foltz | eeef1da | 2019-11-06 13:40:18 -0800 | [diff] [blame] | 87 | "cast/sender:unittests", |
Yuri Wiitala | 7d2583a | 2019-11-22 15:04:27 -0800 | [diff] [blame] | 88 | "cast/streaming:unittests", |
btolsch | 3fb8481 | 2019-12-17 18:23:10 -0800 | [diff] [blame] | 89 | "cast/test:unittests", |
Ryan Keane | bd5d0f0 | 2019-10-21 16:46:56 -0700 | [diff] [blame] | 90 | "discovery:unittests", |
mark a. foltz | 3fe4617 | 2019-09-18 05:50:30 -0700 | [diff] [blame] | 91 | "osp:unittests", |
mark a. foltz | 115345f | 2019-05-02 14:17:16 -0700 | [diff] [blame] | 92 | "osp/msgs:unittests", |
mark a. foltz | 3fe4617 | 2019-09-18 05:50:30 -0700 | [diff] [blame] | 93 | "platform:unittests", |
btolsch | 2f2e7fa | 2019-03-29 16:48:49 -0700 | [diff] [blame] | 94 | "third_party/abseil", |
btolsch | 4666ed2 | 2019-04-25 15:58:07 -0700 | [diff] [blame] | 95 | "third_party/googletest:gtest_main", |
mark a. foltz | 3fe4617 | 2019-09-18 05:50:30 -0700 | [diff] [blame] | 96 | "util:unittests", |
btolsch | 762c4da | 2018-03-19 12:27:00 -0700 | [diff] [blame] | 97 | ] |
Jordan Bayles | 21b5adc | 2019-10-25 12:01:20 -0700 | [diff] [blame] | 98 | |
| 99 | if (use_mdns_responder) { |
| 100 | public_deps += [ |
| 101 | "osp/impl/discovery/mdns:unittests", |
| 102 | |
| 103 | # Currently this target only includes mDNS tests. |
| 104 | "osp/impl/testing:unittests", |
| 105 | ] |
| 106 | } |
| 107 | } |
| 108 | |
| 109 | if (!build_with_chromium) { |
| 110 | executable("openscreen_unittests") { |
| 111 | testonly = true |
| 112 | deps = [ |
| 113 | ":openscreen_unittests_all", |
| 114 | ] |
| 115 | } |
btolsch | 762c4da | 2018-03-19 12:27:00 -0700 | [diff] [blame] | 116 | } |
Ryan Keane | 809e0df | 2020-02-10 12:33:44 -0800 | [diff] [blame] | 117 | |
| 118 | if (!build_with_chromium && is_posix) { |
Jordan Bayles | 6b138fb | 2020-02-11 15:15:38 -0800 | [diff] [blame] | 119 | source_set("e2e_tests_all") { |
| 120 | testonly = true |
| 121 | public_deps = [ |
| 122 | "cast/common:discovery_e2e_test", |
btolsch | 1aa8826 | 2020-03-16 18:06:20 -0700 | [diff] [blame^] | 123 | "cast/test:e2e_tests", |
Jordan Bayles | 6b138fb | 2020-02-11 15:15:38 -0800 | [diff] [blame] | 124 | "third_party/googletest:gtest_main", |
| 125 | ] |
| 126 | } |
| 127 | |
Ryan Keane | 809e0df | 2020-02-10 12:33:44 -0800 | [diff] [blame] | 128 | executable("e2e_tests") { |
| 129 | testonly = true |
| 130 | deps = [ |
| 131 | ":e2e_tests_all", |
| 132 | ] |
| 133 | } |
| 134 | } |