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'],
130 # GN version: //third_party/cld_2
131 'target_name': 'cld_2',
133 'sources': ['<@(cld2_core_sources)'],
137 # As described above in the comments for cld2_platform_support, this is a
138 # passthrough target that allows high-level targets to depend upon the same
139 # CLD support as desired by the embedder.
141 # GN version: //third_party/cld_2:cld2_platform_impl
142 'target_name': 'cld2_platform_impl',
144 'dependencies': ['cld2_<(cld2_platform_support)'],
148 # GN version: //third_party/cld_2:cld2_static
149 'target_name': 'cld2_static',
150 'type': 'static_library',
156 '<@(cld2_core_sources)',
157 '<@(cld2_core_impl_sources)',
158 '<@(cld2_data_sources)',
162 'msvs_disabled_warnings': [4267], # size_t -> int conversion.
164 ['cld2_table_size==0', {
165 'sources+': ['<@(cld2_data_smallest_sources)']
167 ['cld2_table_size==2', {
168 'sources+': ['<@(cld2_data_largest_sources)']
174 # GN version: //third_party/cld_2:cld2_dynamic
175 'target_name': 'cld2_dynamic',
176 'type': 'static_library',
179 'msvs_disabled_warnings': [4267], # size_t -> int conversion.
187 '<@(cld2_core_sources)',
188 '<@(cld2_core_impl_sources)',
189 '<@(cld2_dynamic_data_loader_sources)',
191 'defines': ['CLD2_DYNAMIC_MODE'],