Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(284)

Side by Side Diff: components/cronet/ios/BUILD.gn

Issue 1934083002: [Cronet] Use gn desc deps to find third_party licenses. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Generate gn project in temp directory. Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « BUILD.gn ('k') | components/cronet/ios/cronet_environment.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 # Copyright 2015 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
5 import("//build/buildflag_header.gni")
6 import("//build/util/version.gni")
7 import("//chrome/version.gni")
8 import("//testing/test.gni")
9 import("//url/features.gni")
10
11 assert(!is_component_build, "Cronet requires static library build.")
12
13 declare_args() {
14 cronet_enable_data_reduction_proxy_support = false
15 }
16
17 process_version("cronet_version_header") {
18 template_file = "//components/cronet/version.h.in"
19 output = "$target_gen_dir/version.h"
20 extra_args = [
21 "-e",
22 "VERSION_FULL=\"%s.%s.%s.%s\" % (MAJOR,MINOR,BUILD,PATCH)",
23 ]
24 }
25
26 source_set("cronet_static") {
27 deps = [
28 ":cronet_version_header",
29 "//components/metrics:metrics",
30 "//components/metrics/proto:proto",
31 "//net",
32 "//url",
33 ]
34
35 sources = [
36 "../histogram_manager.cc",
37 "../histogram_manager.h",
38 "../url_request_context_config.cc",
39 "../url_request_context_config.h",
40 "Cronet.h",
41 "Cronet.mm",
42 "cronet_bidirectional_stream.cc",
43 "cronet_bidirectional_stream.h",
44 "cronet_c_for_grpc.cc",
45 "cronet_c_for_grpc.h",
46 "cronet_environment.cc",
47 "cronet_environment.h",
48 ]
49
50 if (!use_platform_icu_alternatives) {
51 deps += [ "//base:i18n" ]
52 }
53 }
kapishnikov 2016/05/17 22:03:28 Should we add '-fvisibility=hidden' and '-fvisibil
mef 2016/05/18 16:46:18 Symbol visibility=hidden seems to be default:https
54
55 shared_library("libcronet") {
kapishnikov 2016/05/17 22:03:28 I have renamed the target to 'libcronet_shered' in
mef 2016/05/18 16:46:18 Done.
56 sources = [
kapishnikov 2016/05/17 22:03:28 "cronet_static" already lists these sources. Do we
mef 2016/05/18 16:46:19 Done.
57 "Cronet.h",
58 "Cronet.mm",
59 "cronet_c_for_grpc.cc",
60 "cronet_c_for_grpc.h",
61 ]
62 deps = [
63 ":cronet_static",
64 "//base",
65 "//net:net",
66 ]
67 libs = [ "UIKit.Framework" ]
kapishnikov 2016/05/17 22:03:28 I wonder why we need UIKit.Framework? Will Foundat
mef 2016/05/18 16:46:19 I'm getting these errors without UIKit: Undefined
kapishnikov 2016/05/18 17:23:01 I see. It is used in https://code.google.com/p/chr
68 }
69
70 bundle_data("cronet_test_bundle_data") {
71 testonly = true
72 sources = [
73 "//net/data/ssl/certificates/quic_test.example.com.crt",
74 "//net/data/ssl/certificates/quic_test.example.com.key",
75 "//net/data/ssl/certificates/quic_test.example.com.key.pkcs8",
76 "//net/data/ssl/certificates/quic_test.example.com.key.sct",
77 ]
78 outputs = [
79 "{{bundle_resources_dir}}/{{source_file_part}}",
80 ]
81 }
82
83 test("cronet_test") {
84 testonly = true
85 sources = [
86 "test/cronet_bidirectional_stream_test.mm",
87 "test/cronet_test_runner.mm",
88 "test/quic_test_server.cc",
89 "test/quic_test_server.h",
90 ]
91
92 deps = [
93 ":cronet_static",
94 ":cronet_test_bundle_data",
95 ":cronet_version_header",
96 "//base",
97 "//base:i18n",
98 "//net",
99 "//net:simple_quic_tools",
100 "//net:test_support",
101 "//third_party/icu",
102 ]
103 }
104
105 test("cronet_unittests") {
106 sources = [
107 "//components/cronet/histogram_manager_unittest.cc",
108 "//components/cronet/run_all_unittests.cc",
109 "//components/cronet/url_request_context_config_unittest.cc",
110 ]
111
112 deps = [
113 ":cronet_static",
114 "//base",
115 "//base/test:test_support",
116 "//components/metrics",
117 "//net",
118 "//testing/gtest",
119 ]
120 }
121
122 _package_dir = "$root_out_dir/cronet"
123
124 action("generate_license") {
125 _license_path = "$_package_dir/LICENSE"
126
127 script = "//components/cronet/tools/cronet_licenses.py"
128 outputs = [
129 _license_path,
130 ]
131 args = [
132 "license",
133 rebase_path(_license_path, root_build_dir),
134 "--gn",
135 ]
136 }
137
138 copy("cronet_package_copy") {
139 sources = [
140 "//AUTHORS",
141 "//chrome/VERSION",
142 "//components/cronet/ios/Cronet.h",
143 "//components/cronet/ios/cronet_c_for_grpc.h",
144 ]
145 outputs = [
146 "$_package_dir/{{source_file_part}}",
147 ]
148
149 deps = []
150 }
151
152 group("cronet_package") {
153 deps = [
154 ":cronet_package_copy",
155 ":cronet_static",
156 ":generate_license",
157 ]
158 }
OLDNEW
« no previous file with comments | « BUILD.gn ('k') | components/cronet/ios/cronet_environment.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698