1 # Copyright 2013 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.
6 # See the BUILD.gn file for more extensive comments and documentation. This
7 # .gyp file exists only for compatibility with gyp. The variables defined below
8 # are used in equivalent targets in BUILD.GN.
12 'cld2_platform_support%': 'static',
14 # These sources need to be included in both static and dynamic builds as
15 # well as the dynamic data tool.
16 'cld2_core_sources': [
17 'src/internal/cld2tablesummary.h',
18 'src/internal/cldutil.h',
19 'src/internal/cldutil_shared.h',
20 'src/internal/compact_lang_det_hint_code.h',
21 'src/internal/compact_lang_det_impl.h',
22 'src/internal/debug.h',
23 'src/internal/fixunicodevalue.h',
24 'src/internal/generated_language.h',
25 'src/internal/generated_ulscript.h',
26 'src/internal/getonescriptspan.h',
27 'src/internal/integral_types.h',
28 'src/internal/lang_script.h',
29 'src/internal/langspan.h',
30 'src/internal/offsetmap.h',
31 'src/internal/port.h',
32 'src/internal/scoreonescriptspan.h',
33 'src/internal/stringpiece.h',
34 'src/internal/tote.h',
35 'src/internal/utf8prop_lettermarkscriptnum.h',
36 'src/internal/utf8repl_lettermarklower.h',
37 'src/internal/utf8scannot_lettermarkspecial.h',
38 'src/internal/utf8statetable.h',
39 'src/public/compact_lang_det.h',
40 'src/public/encodings.h',
43 # These sources may have different compilation results based on flags.
44 'cld2_core_impl_sources': [
45 'src/internal/cldutil.cc',
46 'src/internal/cldutil_shared.cc',
47 'src/internal/compact_lang_det.cc',
48 'src/internal/compact_lang_det_hint_code.cc',
49 'src/internal/compact_lang_det_impl.cc',
50 'src/internal/debug_empty.cc',
51 'src/internal/fixunicodevalue.cc',
52 'src/internal/generated_entities.cc',
53 'src/internal/generated_language.cc',
54 'src/internal/generated_ulscript.cc',
55 'src/internal/getonescriptspan.cc',
56 'src/internal/lang_script.cc',
57 'src/internal/offsetmap.cc',
58 'src/internal/scoreonescriptspan.cc',
59 'src/internal/tote.cc',
60 'src/internal/utf8statetable.cc',
63 # These sources are needed for a dynamic build to load data at runtime.
64 'cld2_dynamic_data_loader_sources': [
65 'src/internal/cld2_dynamic_data.h',
66 'src/internal/cld2_dynamic_data.cc',
67 'src/internal/cld2_dynamic_data_loader.h',
68 'src/internal/cld2_dynamic_data_loader.cc',
71 # These sources are for both small-table and large-table data sets.
72 'cld2_data_sources': [
73 'src/internal/cld2_generated_cjk_compatible.cc',
74 'src/internal/cld2_generated_deltaoctachrome.cc',
75 'src/internal/cld2_generated_distinctoctachrome.cc',
76 'src/internal/cld_generated_cjk_delta_bi_4.cc',
77 'src/internal/cld_generated_cjk_uni_prop_80.cc',
78 'src/internal/cld_generated_score_quad_octa_2.cc',
79 'src/internal/generated_distinct_bi_0.cc',
82 # Used when cld2_table_size == 0 (small tables)
83 # See 'cld2_table_size' in build/common.gypi for more information.
84 'cld2_data_smallest_sources': [
85 'src/internal/cld2_generated_quadchrome_16.cc'
88 # Used when cld2_table_size == 2 (large tables)
89 # See 'cld2_table_size' in build/common.gypi for more information.
90 'cld2_data_largest_sources': [
91 'src/internal/cld2_generated_quadchrome_2.cc'
97 # GN version: //third_party/cld_2:cld_2_dynamic_data_tool
98 'target_name': 'cld_2_dynamic_data_tool',
106 # Note: sources list duplicated in GN build.
107 '<@(cld2_core_sources)',
108 '<@(cld2_core_impl_sources)',
109 '<@(cld2_data_sources)',
110 '<@(cld2_dynamic_data_loader_sources)',
111 'src/internal/cld2_dynamic_data_extractor.h',
112 'src/internal/cld2_dynamic_data_extractor.cc',
113 'src/internal/cld2_dynamic_data_tool.cc',
117 'msvs_disabled_warnings': [4267], # size_t -> int conversion.
119 ['cld2_table_size==0', {
120 'sources+': ['<@(cld2_data_smallest_sources)']
122 ['cld2_table_size==2', {
123 'sources+': ['<@(cld2_data_largest_sources)']
126 'defines': ['CLD2_DYNAMIC_MODE'],
128 'clang_warning_flags': [
129 # The generated files don't have braces around subobject initializers.
130 '-Wno-missing-braces',
136 # GN version: //third_party/cld_2
137 'target_name': 'cld_2',
139 'sources': ['<@(cld2_core_sources)'],
143 # As described above in the comments for cld2_platform_support, this is a
144 # passthrough target that allows high-level targets to depend upon the same
145 # CLD support as desired by the embedder.
147 # GN version: //third_party/cld_2:cld2_platform_impl
148 'target_name': 'cld2_platform_impl',
150 'dependencies': ['cld2_<(cld2_platform_support)'],
154 # GN version: //third_party/cld_2:cld2_static
155 'target_name': 'cld2_static',
156 'type': 'static_library',
162 '<@(cld2_core_sources)',
163 '<@(cld2_core_impl_sources)',
164 '<@(cld2_data_sources)',
168 'msvs_disabled_warnings': [4267], # size_t -> int conversion.
170 ['cld2_table_size==0', {
171 'sources+': ['<@(cld2_data_smallest_sources)']
173 ['cld2_table_size==2', {
174 'sources+': ['<@(cld2_data_largest_sources)']
178 'clang_warning_flags': [
179 # The generated files don't have braces around subobject initializers.
180 '-Wno-missing-braces',
181 # cld_2 contains unused private fields,
182 # https://code.google.com/p/cld2/issues/detail?id=37
183 '-Wno-unused-private-field',
189 # GN version: //third_party/cld_2:cld2_dynamic
190 'target_name': 'cld2_dynamic',
191 'type': 'static_library',
194 'msvs_disabled_warnings': [4267], # size_t -> int conversion.
202 '<@(cld2_core_sources)',
203 '<@(cld2_core_impl_sources)',
204 '<@(cld2_dynamic_data_loader_sources)',
206 'defines': ['CLD2_DYNAMIC_MODE'],
208 'clang_warning_flags': [
209 # cld_2 contains unused private fields,
210 # https://code.google.com/p/cld2/issues/detail?id=37
211 '-Wno-unused-private-field',