OLD | NEW |
---|---|
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2012 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 { | 5 { |
6 'includes': [ | 6 'includes': [ |
7 'icu.gypi', | 7 'icu.gypi', |
8 ], | 8 ], |
9 'variables': { | 9 'variables': { |
10 'use_system_icu%': 0, | 10 'use_system_icu%': 0, |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
62 'sources': [ | 62 'sources': [ |
63 # These are hand-generated, but will do for now. The linux | 63 # These are hand-generated, but will do for now. The linux |
64 # version is an identical copy of the (mac) icudt46l_dat.S file, | 64 # version is an identical copy of the (mac) icudt46l_dat.S file, |
65 # modulo removal of the .private_extern and .const directives and | 65 # modulo removal of the .private_extern and .const directives and |
66 # with no leading underscore on the icudt46_dat symbol. | 66 # with no leading underscore on the icudt46_dat symbol. |
67 'android/icudt46l_dat.S', | 67 'android/icudt46l_dat.S', |
68 'linux/icudt46l_dat.S', | 68 'linux/icudt46l_dat.S', |
69 'mac/icudt46l_dat.S', | 69 'mac/icudt46l_dat.S', |
70 ], | 70 ], |
71 'conditions': [ | 71 'conditions': [ |
72 [ 'use_system_icu==1', { | 72 [ 'use_system_icu==1 and want_separate_host_toolset==1', { |
73 'toolsets': ['host'], | |
74 }, { | |
75 'toolsets': ['host', 'target'], | 73 'toolsets': ['host', 'target'], |
74 'target_conditions': [ | |
75 [ '_toolset == "target"', { | |
76 'type': 'none', | |
77 'dependencies': ['system_icudata'], | |
78 'export_dependent_settings': ['system_icudata'], | |
dshwang
2014/01/03 20:36:42
I try to not build it for target toolset as above:
| |
79 }], | |
80 ], # target_conditions | |
81 }], | |
82 [ 'use_system_icu==0 and want_separate_host_toolset==1', { | |
83 'toolsets': ['host', 'target'], | |
84 }], | |
85 [ 'use_system_icu==0 and want_separate_host_toolset==0', { | |
86 'toolsets': ['target'], | |
76 }], | 87 }], |
77 [ 'OS == "win" and icu_use_data_file_flag==0', { | 88 [ 'OS == "win" and icu_use_data_file_flag==0', { |
78 'type': 'none', | 89 'type': 'none', |
79 'copies': [ | 90 'copies': [ |
80 { | 91 { |
81 'destination': '<(PRODUCT_DIR)', | 92 'destination': '<(PRODUCT_DIR)', |
82 'files': [ | 93 'files': [ |
83 'windows/icudt.dll', | 94 'windows/icudt.dll', |
84 ], | 95 ], |
85 }, | 96 }, |
(...skipping 29 matching lines...) Expand all Loading... | |
115 '(OS == "android" and (_toolset == "target" or host_os != "linux") )', { | 126 '(OS == "android" and (_toolset == "target" or host_os != "linux") )', { |
116 'sources!': ['linux/icudt46l_dat.S'], | 127 'sources!': ['linux/icudt46l_dat.S'], |
117 }], | 128 }], |
118 [ 'OS != "android" or _toolset == "host"', { | 129 [ 'OS != "android" or _toolset == "host"', { |
119 'sources!': ['android/icudt46l_dat.S'], | 130 'sources!': ['android/icudt46l_dat.S'], |
120 }], | 131 }], |
121 [ 'OS != "mac" and OS != "ios" and ' | 132 [ 'OS != "mac" and OS != "ios" and ' |
122 '(OS != "android" or _toolset != "host" or host_os != "mac")', { | 133 '(OS != "android" or _toolset != "host" or host_os != "mac")', { |
123 'sources!': ['mac/icudt46l_dat.S'], | 134 'sources!': ['mac/icudt46l_dat.S'], |
124 }], | 135 }], |
125 ], | 136 ], # target_conditions |
126 }, | 137 }, |
127 { | 138 { |
128 'target_name': 'icui18n', | 139 'target_name': 'icui18n', |
129 'type': '<(component)', | 140 'type': '<(component)', |
130 'sources': [ | 141 'sources': [ |
131 '<@(icui18n_sources)', | 142 '<@(icui18n_sources)', |
132 ], | 143 ], |
133 'defines': [ | 144 'defines': [ |
134 'U_I18N_IMPLEMENTATION', | 145 'U_I18N_IMPLEMENTATION', |
135 ], | 146 ], |
136 'dependencies': [ | 147 'dependencies': [ |
137 'icuuc', | 148 'icuuc', |
138 ], | 149 ], |
139 'direct_dependent_settings': { | 150 'direct_dependent_settings': { |
140 'include_dirs': [ | 151 'include_dirs': [ |
141 'source/i18n', | 152 'source/i18n', |
142 ], | 153 ], |
143 }, | 154 }, |
144 'conditions': [ | 155 'conditions': [ |
145 [ 'use_system_icu==1', { | 156 [ 'use_system_icu==1 and want_separate_host_toolset==1', { |
146 'toolsets': ['host'], | |
147 }, { | |
148 'toolsets': ['host', 'target'], | 157 'toolsets': ['host', 'target'], |
158 'target_conditions': [ | |
159 [ '_toolset == "target"', { | |
160 'type': 'none', | |
161 'dependencies': ['system_icui18n'], | |
162 'export_dependent_settings': ['system_icui18n'], | |
163 }], | |
164 ], # target_conditions | |
165 }], | |
166 [ 'use_system_icu==0 and want_separate_host_toolset==1', { | |
167 'toolsets': ['host', 'target'], | |
168 }], | |
169 [ 'use_system_icu==0 and want_separate_host_toolset==0', { | |
170 'toolsets': ['target'], | |
149 }], | 171 }], |
150 [ 'os_posix == 1 and OS != "mac" and OS != "ios"', { | 172 [ 'os_posix == 1 and OS != "mac" and OS != "ios"', { |
151 # Since ICU wants to internally use its own deprecated APIs, don't | 173 # Since ICU wants to internally use its own deprecated APIs, don't |
152 # complain about it. | 174 # complain about it. |
153 'cflags': [ | 175 'cflags': [ |
154 '-Wno-deprecated-declarations', | 176 '-Wno-deprecated-declarations', |
155 ], | 177 ], |
156 'cflags_cc': [ | 178 'cflags_cc': [ |
157 '-frtti', | 179 '-frtti', |
158 ], | 180 ], |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
211 '<(android_src)/abi/cpp/include', | 233 '<(android_src)/abi/cpp/include', |
212 ], | 234 ], |
213 'link_settings': { | 235 'link_settings': { |
214 'libraries': [ | 236 'libraries': [ |
215 '-lgabi++', | 237 '-lgabi++', |
216 ], | 238 ], |
217 }, | 239 }, |
218 }], | 240 }], |
219 ], | 241 ], |
220 }], | 242 }], |
221 ], | 243 ], # conditions |
222 }, | 244 }, |
223 { | 245 { |
224 'target_name': 'icuuc', | 246 'target_name': 'icuuc', |
225 'type': '<(component)', | 247 'type': '<(component)', |
226 'sources': [ | 248 'sources': [ |
227 '<@(icuuc_sources)', | 249 '<@(icuuc_sources)', |
228 ], | 250 ], |
229 'defines': [ | 251 'defines': [ |
230 'U_COMMON_IMPLEMENTATION', | 252 'U_COMMON_IMPLEMENTATION', |
231 ], | 253 ], |
232 'dependencies': [ | 254 'dependencies': [ |
233 'icudata', | 255 'icudata', |
234 ], | 256 ], |
235 'direct_dependent_settings': { | 257 'direct_dependent_settings': { |
236 'include_dirs': [ | 258 'include_dirs': [ |
237 'source/common', | 259 'source/common', |
238 ], | 260 ], |
239 'conditions': [ | 261 'conditions': [ |
240 [ 'component=="static_library"', { | 262 [ 'component=="static_library"', { |
241 'defines': [ | 263 'defines': [ |
242 'U_STATIC_IMPLEMENTATION', | 264 'U_STATIC_IMPLEMENTATION', |
243 ], | 265 ], |
244 }], | 266 }], |
245 ], | 267 ], |
246 }, | 268 }, |
247 'conditions': [ | 269 'conditions': [ |
248 [ 'use_system_icu==1', { | 270 [ 'use_system_icu==1 and want_separate_host_toolset==1', { |
249 'toolsets': ['host'], | |
250 }, { | |
251 'toolsets': ['host', 'target'], | 271 'toolsets': ['host', 'target'], |
272 'target_conditions': [ | |
273 [ '_toolset == "target"', { | |
274 'type': 'none', | |
275 'dependencies': ['system_icuuc'], | |
276 'export_dependent_settings': ['system_icuuc'], | |
277 }], | |
278 ], # target_conditions | |
279 }], | |
280 [ 'use_system_icu==0 and want_separate_host_toolset==1', { | |
281 'toolsets': ['host', 'target'], | |
282 }], | |
283 [ 'use_system_icu==0 and want_separate_host_toolset==0', { | |
284 'toolsets': ['target'], | |
252 }], | 285 }], |
253 [ 'OS == "win"', { | 286 [ 'OS == "win"', { |
254 'sources': [ | 287 'sources': [ |
255 'source/stubdata/stubdata.c', | 288 'source/stubdata/stubdata.c', |
256 ], | 289 ], |
257 }], | 290 }], |
258 [ 'os_posix == 1 and OS != "mac" and OS != "ios"', { | 291 [ 'os_posix == 1 and OS != "mac" and OS != "ios"', { |
259 'cflags': [ | 292 'cflags': [ |
260 # Since ICU wants to internally use its own deprecated APIs, | 293 # Since ICU wants to internally use its own deprecated APIs, |
261 # don't complain about it. | 294 # don't complain about it. |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
311 '-Wno-switch', | 344 '-Wno-switch', |
312 ], | 345 ], |
313 }, | 346 }, |
314 'cflags': [ | 347 'cflags': [ |
315 '-Wno-deprecated-declarations', | 348 '-Wno-deprecated-declarations', |
316 '-Wno-logical-op-parentheses', | 349 '-Wno-logical-op-parentheses', |
317 '-Wno-tautological-compare', | 350 '-Wno-tautological-compare', |
318 '-Wno-switch', | 351 '-Wno-switch', |
319 ], | 352 ], |
320 }], | 353 }], |
321 ], | 354 ], # conditions |
355 }, | |
356 ], # targets | |
357 }, { # want_separate_host_toolset == 0 and use_system_icu == 1 | |
358 'targets': [ | |
359 { | |
360 'target_name': 'icudata', | |
361 'type': 'none', | |
362 'dependencies': ['system_icudata'], | |
363 'export_dependent_settings': ['system_icudata'], | |
364 'toolsets': ['target'], | |
365 }, | |
366 { | |
367 'target_name': 'icui18n', | |
368 'type': 'none', | |
369 'dependencies': ['system_icui18n'], | |
370 'export_dependent_settings': ['system_icui18n'], | |
371 'toolsets': ['target'], | |
372 }, | |
373 { | |
374 'target_name': 'icuuc', | |
375 'type': 'none', | |
376 'dependencies': ['system_icuuc'], | |
377 'export_dependent_settings': ['system_icuuc'], | |
378 'toolsets': ['target'], | |
322 }, | 379 }, |
323 ], | 380 ], |
324 }], | 381 }], |
325 ['use_system_icu==1', { | 382 ['use_system_icu==1', { |
326 'targets': [ | 383 'targets': [ |
327 { | 384 { |
328 'target_name': 'system_icu', | 385 'target_name': 'system_icu', |
329 'type': 'none', | 386 'type': 'none', |
330 'conditions': [ | 387 'conditions': [ |
331 ['want_separate_host_toolset==1', { | |
332 'toolsets': ['target'], | |
333 }, { | |
334 'toolsets': ['host', 'target'], | |
335 }], | |
336 ['OS=="android"', { | 388 ['OS=="android"', { |
337 'direct_dependent_settings': { | 389 'direct_dependent_settings': { |
338 'include_dirs': [ | 390 'include_dirs': [ |
339 '<(android_src)/external/icu4c/common', | 391 '<(android_src)/external/icu4c/common', |
340 '<(android_src)/external/icu4c/i18n', | 392 '<(android_src)/external/icu4c/i18n', |
341 ], | 393 ], |
342 }, | 394 }, |
343 'link_settings': { | 395 'link_settings': { |
344 'libraries': [ | 396 'libraries': [ |
345 '-licui18n', | 397 '-licui18n', |
346 '-licuuc', | 398 '-licuuc', |
347 ], | 399 ], |
348 }, | 400 }, |
349 },{ # OS!="android" | 401 },{ # OS!="android" |
350 'link_settings': { | 402 'link_settings': { |
351 'ldflags': [ | 403 'ldflags': [ |
352 '<!@(icu-config --ldflags)', | 404 '<!@(icu-config --ldflags)', |
353 ], | 405 ], |
354 'libraries': [ | 406 'libraries': [ |
355 '<!@(icu-config --ldflags-libsonly)', | 407 '<!@(icu-config --ldflags-libsonly)', |
356 ], | 408 ], |
357 }, | 409 }, |
358 }], | 410 }], |
359 ], | 411 ], |
360 }, | 412 }, |
361 { | 413 { |
362 'target_name': 'icudata', | 414 'target_name': 'system_icudata', |
363 'type': 'none', | 415 'type': 'none', |
364 'dependencies': ['system_icu'], | 416 'dependencies': ['system_icu'], |
365 'export_dependent_settings': ['system_icu'], | 417 'export_dependent_settings': ['system_icu'], |
366 'conditions': [ | |
367 ['want_separate_host_toolset==1', { | |
368 'toolsets': ['target'], | |
369 }, { | |
370 'toolsets': ['host', 'target'], | |
371 }], | |
372 ], | |
373 }, | 418 }, |
374 { | 419 { |
375 'target_name': 'icui18n', | 420 'target_name': 'system_icui18n', |
376 'type': 'none', | 421 'type': 'none', |
377 'dependencies': ['system_icu'], | 422 'dependencies': ['system_icu'], |
378 'export_dependent_settings': ['system_icu'], | 423 'export_dependent_settings': ['system_icu'], |
379 'variables': { | 424 'variables': { |
380 'headers_root_path': 'source/i18n', | 425 'headers_root_path': 'source/i18n', |
381 'header_filenames': [ | 426 'header_filenames': [ |
382 # This list can easily be updated using the command below: | 427 # This list can easily be updated using the command below: |
383 # find third_party/icu/source/i18n/unicode -iname '*.h' \ | 428 # find third_party/icu/source/i18n/unicode -iname '*.h' \ |
384 # -printf "'%p',\n" | \ | 429 # -printf "'%p',\n" | \ |
385 # sed -e 's|third_party/icu/source/i18n/||' | sort -u | 430 # sed -e 's|third_party/icu/source/i18n/||' | sort -u |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
449 'unicode/usearch.h', | 494 'unicode/usearch.h', |
450 'unicode/uspoof.h', | 495 'unicode/uspoof.h', |
451 'unicode/utmscale.h', | 496 'unicode/utmscale.h', |
452 'unicode/utrans.h', | 497 'unicode/utrans.h', |
453 'unicode/vtzone.h', | 498 'unicode/vtzone.h', |
454 ], | 499 ], |
455 }, | 500 }, |
456 'includes': [ | 501 'includes': [ |
457 '../../build/shim_headers.gypi', | 502 '../../build/shim_headers.gypi', |
458 ], | 503 ], |
459 'conditions': [ | |
460 ['want_separate_host_toolset==1', { | |
461 'toolsets': ['target'], | |
462 }, { | |
463 'toolsets': ['host', 'target'], | |
464 }], | |
465 ], | |
466 }, | 504 }, |
467 { | 505 { |
468 'target_name': 'icuuc', | 506 'target_name': 'system_icuuc', |
469 'type': 'none', | 507 'type': 'none', |
470 'dependencies': ['system_icu'], | 508 'dependencies': ['system_icu'], |
471 'export_dependent_settings': ['system_icu'], | 509 'export_dependent_settings': ['system_icu'], |
472 'variables': { | 510 'variables': { |
473 'headers_root_path': 'source/common', | 511 'headers_root_path': 'source/common', |
474 'header_filenames': [ | 512 'header_filenames': [ |
475 # This list can easily be updated using the command below: | 513 # This list can easily be updated using the command below: |
476 # find third_party/icu/source/common/unicode -iname '*.h' \ | 514 # find third_party/icu/source/common/unicode -iname '*.h' \ |
477 # -printf "'%p',\n" | \ | 515 # -printf "'%p',\n" | \ |
478 # sed -e 's|third_party/icu/source/common/||' | sort -u | 516 # sed -e 's|third_party/icu/source/common/||' | sort -u |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
560 'unicode/utrace.h', | 598 'unicode/utrace.h', |
561 'unicode/utypeinfo.h', | 599 'unicode/utypeinfo.h', |
562 'unicode/utypes.h', | 600 'unicode/utypes.h', |
563 'unicode/uvernum.h', | 601 'unicode/uvernum.h', |
564 'unicode/uversion.h', | 602 'unicode/uversion.h', |
565 ], | 603 ], |
566 }, | 604 }, |
567 'includes': [ | 605 'includes': [ |
568 '../../build/shim_headers.gypi', | 606 '../../build/shim_headers.gypi', |
569 ], | 607 ], |
570 'conditions': [ | |
571 ['want_separate_host_toolset==1', { | |
572 'toolsets': ['target'], | |
573 }, { | |
574 'toolsets': ['host', 'target'], | |
575 }], | |
576 ], | |
577 }, | 608 }, |
578 ], | 609 ], # targets |
579 }], | 610 }], |
580 ], | 611 ], # conditions |
581 } | 612 } |
OLD | NEW |