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 # Meta target that includes both icuuc and icui18n. Most targets want both. | 5 # Meta target that includes both icuuc and icui18n. Most targets want both. |
6 # You can depend on the individually if you need to. | 6 # You can depend on the individually if you need to. |
7 group("icu") { | 7 group("icu") { |
8 deps = [ | 8 deps = [ |
9 ":icui18n", | 9 ":icui18n", |
10 ":icuuc", | 10 ":icuuc", |
11 ] | 11 ] |
12 } | 12 } |
13 | 13 |
14 # Shared config used by ICU and all dependents. | 14 # Shared config used by ICU and all dependents. |
15 config("icu_config") { | 15 config("icu_config") { |
16 defines = [ | 16 defines = [ |
17 "U_USING_ICU_NAMESPACE=0", | 17 "U_USING_ICU_NAMESPACE=0", |
18 ] | 18 ] |
19 include_dirs = [ | 19 include_dirs = [ |
20 "source/common", | 20 "source/common", |
21 "source/i18n", | 21 "source/i18n", |
22 ] | 22 ] |
23 } | 23 } |
24 | 24 |
25 # Config used only by ICU code. | 25 # Config used only by ICU code. |
26 config("icu_code") { | 26 config("icu_code") { |
27 if (component_mode == "static_library") { | 27 if (component_mode != "shared_library") { |
28 defines = [ "U_STATIC_IMPLEMENTATION" ] | 28 defines = [ "U_STATIC_IMPLEMENTATION" ] |
29 } | 29 } |
30 | 30 |
31 if (is_win) { | 31 if (is_win) { |
32 # Disable some compiler warnings. | 32 # Disable some compiler warnings. |
33 cflags = [ | 33 cflags = [ |
34 "/wd4005", # Macro redefinition. | 34 "/wd4005", # Macro redefinition. |
35 "/wd4068", # Unknown pragmas. | 35 "/wd4068", # Unknown pragmas. |
36 "/wd4267", # Conversion from size_t on 64-bits. | 36 "/wd4267", # Conversion from size_t on 64-bits. |
37 "/wd4996", # Deprecated functions. | 37 "/wd4996", # Deprecated functions. |
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
419 } | 419 } |
420 } | 420 } |
421 | 421 |
422 if (is_win) { | 422 if (is_win) { |
423 # On Windows the target DLL is pre-built so just use a copy rule. | 423 # On Windows the target DLL is pre-built so just use a copy rule. |
424 copy("icudata") { | 424 copy("icudata") { |
425 sources = [ "windows/icudt.dll" ] | 425 sources = [ "windows/icudt.dll" ] |
426 outputs = [ "$root_out_dir/icudt.dll" ] | 426 outputs = [ "$root_out_dir/icudt.dll" ] |
427 } | 427 } |
428 } else { | 428 } else { |
429 static_library("icudata") { | 429 source_set("icudata") { |
430 sources = [ | 430 sources = [ |
431 # These are hand-generated, but will do for now. The linux version is an | 431 # These are hand-generated, but will do for now. The linux version is an |
432 # identical copy of the (mac) icudt46l_dat.S file, modulo removal of the | 432 # identical copy of the (mac) icudt46l_dat.S file, modulo removal of the |
433 # .private_extern and .const directives and with no leading underscore on | 433 # .private_extern and .const directives and with no leading underscore on |
434 # the icudt46_dat symbol. | 434 # the icudt46_dat symbol. |
435 "android/icudt46l_dat.S", | 435 "android/icudt46l_dat.S", |
436 "linux/icudt46l_dat.S", | 436 "linux/icudt46l_dat.S", |
437 "mac/icudt46l_dat.S", | 437 "mac/icudt46l_dat.S", |
438 ] | 438 ] |
439 defines = [ "U_HIDE_DATA_SYMBOL" ] | 439 defines = [ "U_HIDE_DATA_SYMBOL" ] |
440 | 440 |
441 # TODO(brettw) support use_system_icu and icu_use_data_file_flag. | 441 # TODO(brettw) support use_system_icu and icu_use_data_file_flag. |
442 } | 442 } |
443 } | 443 } |
OLD | NEW |