OLD | NEW |
---|---|
1 # Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 import("//build/buildflag_header.gni") | 5 import("//build/buildflag_header.gni") |
6 import("//build/config/ios/rules.gni") | 6 import("//build/config/ios/rules.gni") |
7 import("//build/mac/tweak_info_plist.gni") | |
7 import("//build/util/version.gni") | 8 import("//build/util/version.gni") |
8 import("//chrome/version.gni") | 9 import("//chrome/version.gni") |
9 import("//testing/test.gni") | 10 import("//testing/test.gni") |
10 import("//url/features.gni") | 11 import("//url/features.gni") |
11 | 12 |
12 assert(!is_component_build, "Cronet requires static library build.") | 13 assert(!is_component_build, "Cronet requires static library build.") |
13 | 14 |
14 declare_args() { | 15 declare_args() { |
15 cronet_enable_data_reduction_proxy_support = false | 16 cronet_enable_data_reduction_proxy_support = false |
16 } | 17 } |
(...skipping 29 matching lines...) Expand all Loading... | |
46 "cronet_c_for_grpc.h", | 47 "cronet_c_for_grpc.h", |
47 "cronet_environment.cc", | 48 "cronet_environment.cc", |
48 "cronet_environment.h", | 49 "cronet_environment.h", |
49 ] | 50 ] |
50 | 51 |
51 if (!use_platform_icu_alternatives) { | 52 if (!use_platform_icu_alternatives) { |
52 deps += [ "//base:i18n" ] | 53 deps += [ "//base:i18n" ] |
53 } | 54 } |
54 } | 55 } |
55 | 56 |
57 # Tweak |info_plist| with current version and revision. | |
58 tweak_info_plist("cronet_framework_plist") { | |
59 info_plist = "Info.plist" | |
60 args = [ "--bundle_id=CRNT" ] | |
sdefresne
2016/07/01 12:50:11
The "Info.plist" file already contains the followi
mef
2016/07/01 14:10:08
Done. I've kept it because omitting args triggers
| |
61 } | |
62 | |
63 # Compile plist into |output_name|. | |
64 ios_info_plist("cronet_info_plist") { | |
65 executable_name = "Cronet" | |
66 | |
67 output_name = "$root_out_dir/Cronet.framework/Info.plist" | |
sdefresne
2016/07/01 12:50:11
I think this goes against how create_bundle/bundle
mef
2016/07/01 14:10:08
tweak_info_plist also puts correct version and rev
| |
68 info_plist_target = ":cronet_framework_plist" | |
69 } | |
70 | |
56 ios_framework_bundle("cronet_framework") { | 71 ios_framework_bundle("cronet_framework") { |
57 output_name = "Cronet" | 72 output_name = "Cronet" |
58 | 73 |
59 deps = [ | 74 deps = [ |
75 ":cronet_info_plist", | |
60 ":cronet_sources", | 76 ":cronet_sources", |
61 "//base", | 77 "//base", |
62 "//net:net", | 78 "//net:net", |
63 ] | 79 ] |
64 | 80 |
65 info_plist = "Info.plist" | |
66 | |
67 libs = [ "UIKit.Framework" ] | 81 libs = [ "UIKit.Framework" ] |
68 | 82 |
69 public_headers = [ | 83 public_headers = [ |
70 "Cronet.h", | 84 "Cronet.h", |
71 "cronet_c_for_grpc.h", | 85 "cronet_c_for_grpc.h", |
72 ] | 86 ] |
73 | 87 |
74 sources = [ | 88 sources = [ |
75 "Cronet.h", | 89 "Cronet.h", |
76 "Cronet.mm", | 90 "Cronet.mm", |
77 ] | 91 ] |
92 | |
93 configs -= [ "//build/config/compiler:default_symbols" ] | |
94 configs += [ "//build/config/compiler:symbols" ] | |
95 | |
96 ldflags = [] | |
97 | |
98 # For release version generate a separate dSYM. | |
99 if (!is_debug) { | |
100 ldflags += [ "-Wcrl,strip,-x" ] | |
101 ldflags += [ "-Wcrl,dsym," + rebase_path(root_out_dir) ] | |
102 } | |
78 } | 103 } |
79 | 104 |
80 bundle_data("cronet_test_bundle_data") { | 105 bundle_data("cronet_test_bundle_data") { |
81 testonly = true | 106 testonly = true |
82 sources = [ | 107 sources = [ |
83 "//net/data/ssl/certificates/quic_test.example.com.crt", | 108 "//net/data/ssl/certificates/quic_test.example.com.crt", |
84 "//net/data/ssl/certificates/quic_test.example.com.key", | 109 "//net/data/ssl/certificates/quic_test.example.com.key", |
85 "//net/data/ssl/certificates/quic_test.example.com.key.pkcs8", | 110 "//net/data/ssl/certificates/quic_test.example.com.key.pkcs8", |
86 "//net/data/ssl/certificates/quic_test.example.com.key.sct", | 111 "//net/data/ssl/certificates/quic_test.example.com.key.sct", |
87 ] | 112 ] |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
146 } | 171 } |
147 | 172 |
148 copy("cronet_package_copy") { | 173 copy("cronet_package_copy") { |
149 sources = [ | 174 sources = [ |
150 "$root_out_dir/Cronet.framework", | 175 "$root_out_dir/Cronet.framework", |
151 "//AUTHORS", | 176 "//AUTHORS", |
152 "//chrome/VERSION", | 177 "//chrome/VERSION", |
153 "//components/cronet/ios/Cronet.h", | 178 "//components/cronet/ios/Cronet.h", |
154 "//components/cronet/ios/cronet_c_for_grpc.h", | 179 "//components/cronet/ios/cronet_c_for_grpc.h", |
155 ] | 180 ] |
181 if (!is_debug) { | |
182 # sources += [ "$root_out_dir/Cronet.dSYM" ] | |
183 } | |
156 outputs = [ | 184 outputs = [ |
157 "$_package_dir/{{source_file_part}}", | 185 "$_package_dir/{{source_file_part}}", |
158 ] | 186 ] |
159 | 187 |
160 deps = [ | 188 deps = [ |
161 ":cronet_framework", | 189 ":cronet_framework", |
162 ] | 190 ] |
163 } | 191 } |
164 | 192 |
165 group("cronet_package") { | 193 group("cronet_package") { |
166 deps = [ | 194 deps = [ |
167 ":cronet_package_copy", | 195 ":cronet_package_copy", |
168 ":generate_license", | 196 ":generate_license", |
169 ] | 197 ] |
170 } | 198 } |
OLD | NEW |