131bfd5b23b763c1c223995752db9aea3ba4d3e6
[platform/framework/web/crosswalk.git] / src / url / BUILD.gn
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.
4
5 component("url") {
6   if (is_win) {
7     # Don't conflict with Windows' "url.dll".
8     output_name = "url_lib"
9   }
10   sources = [
11     "gurl.cc",
12     "gurl.h",
13     "third_party/mozilla/url_parse.cc",
14     "third_party/mozilla/url_parse.h",
15     "url_canon.h",
16     "url_canon_etc.cc",
17     "url_canon_filesystemurl.cc",
18     "url_canon_fileurl.cc",
19     "url_canon_host.cc",
20     "url_canon_icu.cc",
21     "url_canon_icu.h",
22     "url_canon_internal.cc",
23     "url_canon_internal.h",
24     "url_canon_internal_file.h",
25     "url_canon_ip.cc",
26     "url_canon_ip.h",
27     "url_canon_mailtourl.cc",
28     "url_canon_path.cc",
29     "url_canon_pathurl.cc",
30     "url_canon_query.cc",
31     "url_canon_relative.cc",
32     "url_canon_stdstring.cc",
33     "url_canon_stdstring.h",
34     "url_canon_stdurl.cc",
35     "url_export.h",
36     "url_file.h",
37     "url_parse_file.cc",
38     "url_parse_internal.h",
39     "url_util.cc",
40     "url_util.h",
41   ]
42
43   defines = [ "URL_IMPLEMENTATION" ]
44
45   # if (is_win) {
46   #   TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
47   #   'msvs_disabled_warnings': [ 4267, ]
48   # }
49
50   deps = [
51     "//base",
52     "//third_party/icu:icudata",
53     "//third_party/icu:icui18n",
54     "//third_party/icu:icuuc",
55   ]
56 }
57
58 test("url_unittests") {
59   sources = [
60     "gurl_unittest.cc",
61     "url_canon_unittest.cc",
62     "url_parse_unittest.cc",
63     "url_test_utils.h",
64     "url_util_unittest.cc",
65   ]
66
67   #if (is_posix && !is_mac && !is_ios) {
68   #  # TODO(dmikurube): Kill linux_use_tcmalloc. http://crbug.com/345554
69   #  if ((use_allocator!="none" && use_allocator!="see_use_tcmalloc") || (use_allocator=="see_use_tcmalloc" && linux_use_tcmalloc) {
70   #    deps += "//base/allocator"
71   #  }
72   #}
73
74   # if (is_win) {
75   #   TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
76   #   'msvs_disabled_warnings': [ 4267, ]
77   # }
78
79   deps = [
80     ":url",
81     "//base:base_i18n",
82     "//base/test:run_all_unittests",
83     "//testing/gtest",
84     "//third_party/icu:icuuc",
85   ]
86 }