| OLD | NEW |
| 1 # Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 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 'variables': { | 6 'variables': { |
| 7 'chromium_code': 1, | 7 'chromium_code': 1, |
| 8 }, | 8 }, |
| 9 'includes': [ | 9 'includes': [ |
| 10 'url_srcs.gypi', | 10 'url_srcs.gypi', |
| 11 ], | 11 ], |
| 12 'targets': [ | 12 'targets': [ |
| 13 { | 13 { |
| 14 # Note, this target_name cannot be 'url', because that will generate | 14 # Note, this target_name cannot be 'url', because that will generate |
| 15 # 'url.dll' for a Windows component build, and that will confuse Windows, | 15 # 'url.dll' for a Windows component build, and that will confuse Windows, |
| 16 # which has a system DLL with the same name. | 16 # which has a system DLL with the same name. |
| 17 'target_name': 'url_lib', | 17 'target_name': 'url_lib', |
| 18 'type': '<(component)', | 18 'type': '<(component)', |
| 19 'dependencies': [ | 19 'dependencies': [ |
| 20 '../base/base.gyp:base', | 20 '../base/base.gyp:base', |
| 21 '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic
_annotations', | 21 '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic
_annotations', |
| 22 '../third_party/icu/icu.gyp:icui18n', | 22 ':url_url_features', |
| 23 '../third_party/icu/icu.gyp:icuuc', | |
| 24 ], | 23 ], |
| 25 'sources': [ | 24 'sources': [ |
| 26 '<@(gurl_sources)', | 25 '<@(gurl_sources)', |
| 27 ], | 26 ], |
| 28 'direct_dependent_settings': { | 27 'direct_dependent_settings': { |
| 29 'include_dirs': [ | 28 'include_dirs': [ |
| 30 '..', | 29 '..', |
| 31 ], | 30 ], |
| 32 }, | 31 }, |
| 33 'defines': [ | 32 'defines': [ |
| 34 'URL_IMPLEMENTATION', | 33 'URL_IMPLEMENTATION', |
| 35 ], | 34 ], |
| 36 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. | 35 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. |
| 37 'msvs_disabled_warnings': [4267, ], | 36 'msvs_disabled_warnings': [4267, ], |
| 37 |
| 38 # ICU Alternatives for Android & iOS |
| 39 'conditions': [ |
| 40 ['use_platform_icu_alternatives == 1', { |
| 41 'sources!': [ |
| 42 'url_canon_icu.cc', |
| 43 'url_canon_icu.h', |
| 44 ], |
| 45 'conditions': [ |
| 46 ['OS == "android"', { |
| 47 'dependencies': [ |
| 48 'url_java', |
| 49 'url_jni_headers', |
| 50 ], |
| 51 'sources': [ |
| 52 'url_canon_icu_alternatives_android.cc', |
| 53 'url_canon_icu_alternatives_android.h', |
| 54 ], |
| 55 }], |
| 56 ['OS == "ios"', { |
| 57 'sources': [ |
| 58 'url_canon_icu_alternatives_ios.mm', |
| 59 ], |
| 60 }], |
| 61 ], |
| 62 }, |
| 63 # 'use_platform_icu_alternatives != 1' |
| 64 { |
| 65 'dependencies': [ |
| 66 '../third_party/icu/icu.gyp:icui18n', |
| 67 '../third_party/icu/icu.gyp:icuuc', |
| 68 ], |
| 69 }], |
| 70 ], |
| 38 }, | 71 }, |
| 39 { | 72 { |
| 40 'target_name': 'url_unittests', | 73 'target_name': 'url_unittests', |
| 41 'type': 'executable', | 74 'type': 'executable', |
| 42 'dependencies': [ | 75 'dependencies': [ |
| 43 '../base/base.gyp:test_support_base', | 76 '../base/base.gyp:test_support_base', |
| 44 '../mojo/mojo_edk.gyp:mojo_common_test_support', | 77 '../mojo/mojo_edk.gyp:mojo_common_test_support', |
| 45 '../testing/gtest.gyp:gtest', | 78 '../testing/gtest.gyp:gtest', |
| 46 '../third_party/icu/icu.gyp:icuuc', | 79 '../third_party/icu/icu.gyp:icuuc', |
| 47 'url_test_mojom', | 80 'url_test_mojom', |
| 48 'url_lib', | 81 'url_lib', |
| 49 ], | 82 ], |
| 50 'sources': [ | 83 'sources': [ |
| 51 'gurl_unittest.cc', | 84 'gurl_unittest.cc', |
| 52 'origin_unittest.cc', | 85 'origin_unittest.cc', |
| 53 'run_all_unittests.cc', | 86 'run_all_unittests.cc', |
| 54 'scheme_host_port_unittest.cc', | 87 'scheme_host_port_unittest.cc', |
| 55 'url_canon_icu_unittest.cc', | 88 'url_canon_icu_unittest.cc', |
| 56 'url_canon_unittest.cc', | 89 'url_canon_unittest.cc', |
| 57 'url_parse_unittest.cc', | 90 'url_parse_unittest.cc', |
| 58 'url_test_utils.h', | 91 'url_test_utils.h', |
| 59 'url_util_unittest.cc', | 92 'url_util_unittest.cc', |
| 60 ], | 93 ], |
| 61 'conditions': [ | 94 'conditions': [ |
| 62 ['OS!="ios"', { | 95 ['OS!="ios"', { |
| 63 'sources': [ | 96 'sources': [ |
| 64 'mojo/url_gurl_struct_traits_unittest.cc', | 97 'mojo/url_gurl_struct_traits_unittest.cc', |
| 65 ], | 98 ], |
| 66 }], | 99 }], |
| 100 # Unit tests that are not supported by the current ICU alternatives on A
ndroid. |
| 101 ['OS == "android" and use_platform_icu_alternatives == 1', { |
| 102 'sources!': [ |
| 103 'url_canon_icu_unittest.cc', |
| 104 ], |
| 105 }], |
| 106 # Unit tests that are not supported by the current ICU alternatives on i
OS. |
| 107 ['OS == "ios" and use_platform_icu_alternatives == 1', { |
| 108 'sources!': [ |
| 109 'origin_unittest.cc', |
| 110 'scheme_host_port_unittest.cc', |
| 111 'url_canon_icu_unittest.cc', |
| 112 'url_canon_unittest.cc', |
| 113 ], |
| 114 }], |
| 67 ], | 115 ], |
| 68 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. | 116 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. |
| 69 'msvs_disabled_warnings': [4267, ], | 117 'msvs_disabled_warnings': [4267, ], |
| 70 }, | 118 }, |
| 71 { | 119 { |
| 72 'target_name': 'url_interfaces_mojom', | 120 'target_name': 'url_interfaces_mojom', |
| 73 'type': 'none', | 121 'type': 'none', |
| 74 'variables': { | 122 'variables': { |
| 75 'mojom_extra_generator_args': [ | 123 'mojom_extra_generator_args': [ |
| 76 '--typemap', '<(DEPTH)/url/mojo/origin.typemap', | 124 '--typemap', '<(DEPTH)/url/mojo/origin.typemap', |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 'type': 'static_library', | 165 'type': 'static_library', |
| 118 'export_dependent_settings': [ | 166 'export_dependent_settings': [ |
| 119 '../mojo/mojo_public.gyp:mojo_cpp_bindings', | 167 '../mojo/mojo_public.gyp:mojo_cpp_bindings', |
| 120 ], | 168 ], |
| 121 'dependencies': [ | 169 'dependencies': [ |
| 122 '../mojo/mojo_public.gyp:mojo_cpp_bindings', | 170 '../mojo/mojo_public.gyp:mojo_cpp_bindings', |
| 123 'url_mojom', | 171 'url_mojom', |
| 124 'url_test_interfaces_mojom', | 172 'url_test_interfaces_mojom', |
| 125 ], | 173 ], |
| 126 }, | 174 }, |
| 175 { |
| 176 # GN version: //url:url_features |
| 177 'target_name': 'url_url_features', |
| 178 'includes': [ '../build/buildflag_header.gypi' ], |
| 179 'variables': { |
| 180 'buildflag_header_path': 'url/url_features.h', |
| 181 'buildflag_flags': [ |
| 182 'USE_PLATFORM_ICU_ALTERNATIVES=<(use_platform_icu_alternatives)', |
| 183 ], |
| 184 }, |
| 185 } |
| 127 ], | 186 ], |
| 128 'conditions': [ | 187 'conditions': [ |
| 129 ['OS=="android"', { | 188 ['OS=="android"', { |
| 130 'targets': [ | 189 'targets': [ |
| 131 { | 190 { |
| 132 'target_name': 'url_jni_headers', | 191 'target_name': 'url_jni_headers', |
| 133 'type': 'none', | 192 'type': 'none', |
| 134 'sources': [ | 193 'sources': [ |
| 135 'android/java/src/org/chromium/url/IDNStringUtil.java' | 194 'android/java/src/org/chromium/url/IDNStringUtil.java' |
| 136 ], | 195 ], |
| 137 'variables': { | 196 'variables': { |
| 138 'jni_gen_package': 'url', | 197 'jni_gen_package': 'url', |
| 139 }, | 198 }, |
| 140 'includes': [ '../build/jni_generator.gypi' ], | 199 'includes': [ '../build/jni_generator.gypi' ], |
| 141 }, | 200 }, |
| 142 { | 201 { |
| 143 'target_name': 'url_java', | 202 'target_name': 'url_java', |
| 144 'type': 'none', | 203 'type': 'none', |
| 145 'variables': { | 204 'variables': { |
| 146 'java_in_dir': '../url/android/java', | 205 'java_in_dir': '../url/android/java', |
| 147 }, | 206 }, |
| 148 'dependencies': [ | 207 'dependencies': [ |
| 149 '../base/base.gyp:base', | 208 '../base/base.gyp:base', |
| 150 ], | 209 ], |
| 151 'includes': [ '../build/java.gypi' ], | 210 'includes': [ '../build/java.gypi' ], |
| 152 }, | 211 }, |
| 153 { | |
| 154 # Same as url_lib but using ICU alternatives on Android. | |
| 155 'target_name': 'url_lib_use_icu_alternatives_on_android', | |
| 156 'type': '<(component)', | |
| 157 'dependencies': [ | |
| 158 '../base/base.gyp:base', | |
| 159 '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dyn
amic_annotations', | |
| 160 'url_java', | |
| 161 'url_jni_headers', | |
| 162 ], | |
| 163 'sources': [ | |
| 164 '<@(gurl_sources)', | |
| 165 'url_canon_icu_alternatives_android.cc', | |
| 166 'url_canon_icu_alternatives_android.h', | |
| 167 ], | |
| 168 'sources!': [ | |
| 169 'url_canon_icu.cc', | |
| 170 'url_canon_icu.h', | |
| 171 ], | |
| 172 'direct_dependent_settings': { | |
| 173 'include_dirs': [ | |
| 174 '..', | |
| 175 ], | |
| 176 }, | |
| 177 'defines': [ | |
| 178 'URL_IMPLEMENTATION', | |
| 179 'USE_ICU_ALTERNATIVES_ON_ANDROID=1', | |
| 180 ], | |
| 181 }, | |
| 182 ], | 212 ], |
| 183 }], | 213 }], |
| 184 ['test_isolation_mode != "noop"', { | 214 ['test_isolation_mode != "noop"', { |
| 185 'targets': [ | 215 'targets': [ |
| 186 { | 216 { |
| 187 'target_name': 'url_unittests_run', | 217 'target_name': 'url_unittests_run', |
| 188 'type': 'none', | 218 'type': 'none', |
| 189 'dependencies': [ | 219 'dependencies': [ |
| 190 'url_unittests', | 220 'url_unittests', |
| 191 ], | 221 ], |
| 192 'includes': [ | 222 'includes': [ |
| 193 '../build/isolate.gypi', | 223 '../build/isolate.gypi', |
| 194 ], | 224 ], |
| 195 'sources': [ | 225 'sources': [ |
| 196 'url_unittests.isolate', | 226 'url_unittests.isolate', |
| 197 ], | 227 ], |
| 198 }, | 228 }, |
| 199 ], | 229 ], |
| 200 }], | 230 }], |
| 201 ], | 231 ], |
| 202 } | 232 } |
| OLD | NEW |