1 # Copyright (c) 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.
5 import("//url/config.gni")
7 # Sets the USE_ICU_ALTERNATIVES_ON_ANDROID define based on the build flag.
8 config("url_icu_config") {
9 if (use_icu_alternatives_on_android) {
10 defines = [ "USE_ICU_ALTERNATIVES_ON_ANDROID=1" ]
16 # Don't conflict with Windows' "url.dll".
17 output_name = "url_lib"
20 "android/url_jni_registrar.cc",
21 "android/url_jni_registrar.h",
26 "third_party/mozilla/url_parse.cc",
27 "third_party/mozilla/url_parse.h",
30 "url_canon_filesystemurl.cc",
31 "url_canon_fileurl.cc",
35 "url_canon_internal.cc",
36 "url_canon_internal.h",
37 "url_canon_internal_file.h",
40 "url_canon_mailtourl.cc",
42 "url_canon_pathurl.cc",
44 "url_canon_relative.cc",
45 "url_canon_stdstring.cc",
46 "url_canon_stdstring.h",
47 "url_canon_stdurl.cc",
53 "url_parse_internal.h",
58 defines = [ "URL_IMPLEMENTATION" ]
60 configs += [ ":url_icu_config" ]
64 "/wd4267", # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
70 "//base/third_party/dynamic_annotations",
71 "//third_party/icu:icudata",
75 if (use_icu_alternatives_on_android) {
81 "//third_party/icu:icudata",
86 "url_canon_icu_alternatives_android.cc",
87 "url_canon_icu_alternatives_android.h",
92 # TODO(dpranke): crbug.com/360936. Get this to build and run on Android.
94 test("url_unittests") {
98 "url_canon_icu_unittest.cc",
99 "url_canon_unittest.cc",
100 "url_parse_unittest.cc",
102 "url_util_unittest.cc",
105 #if (is_posix && !is_mac && !is_ios) {
106 # if (use_allocator!="none") {
107 # deps += "//base/allocator"
113 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
120 "//base/test:run_all_unittests",
122 "//third_party/icu:icuuc",
125 if (use_icu_alternatives_on_android) {
127 "url_canon_icu_unittest.cc",
130 "//third_party/icu:icuuc",