| OLD | NEW | 
|   1 # Copyright 2014 The Chromium Authors. All rights reserved. |   1 # Copyright 2014 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 config("libxslt_config") { |   5 config("libxslt_config") { | 
|   6   defines = [ "LIBXSLT_STATIC" ] |   6   defines = [ "LIBXSLT_STATIC" ] | 
|   7   include_dirs = [ "." ] |   7   include_dirs = [ "." ] | 
|   8 } |   8 } | 
|   9  |   9  | 
 |  10 config("libxslt_warnings") { | 
 |  11   if (is_clang) { | 
 |  12     cflags = [ | 
 |  13       # libxslt stores a char[3] in a `const unsigned char*`. | 
 |  14       "-Wno-pointer-sign", | 
 |  15  | 
 |  16       # xsltDefaultRegion and xsltCalibrateTimestamps are only | 
 |  17       # used with certain preprocessor defines set. | 
 |  18       "-Wno-unused-function", | 
 |  19     ] | 
 |  20   } | 
 |  21 } | 
 |  22  | 
|  10 static_library("libxslt") { |  23 static_library("libxslt") { | 
|  11   sources = [ |  24   sources = [ | 
|  12     "libxslt/attributes.c", |  25     "libxslt/attributes.c", | 
|  13     "libxslt/attributes.h", |  26     "libxslt/attributes.h", | 
|  14     "libxslt/attrvt.c", |  27     "libxslt/attrvt.c", | 
|  15     "libxslt/documents.c", |  28     "libxslt/documents.c", | 
|  16     "libxslt/documents.h", |  29     "libxslt/documents.h", | 
|  17     "libxslt/extensions.c", |  30     "libxslt/extensions.c", | 
|  18     "libxslt/extensions.h", |  31     "libxslt/extensions.h", | 
|  19     "libxslt/extra.c", |  32     "libxslt/extra.c", | 
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  52     "libxslt/xsltlocale.c", |  65     "libxslt/xsltlocale.c", | 
|  53     "libxslt/xsltlocale.h", |  66     "libxslt/xsltlocale.h", | 
|  54     "libxslt/xsltutils.c", |  67     "libxslt/xsltutils.c", | 
|  55     "libxslt/xsltutils.h", |  68     "libxslt/xsltutils.h", | 
|  56     "libxslt/xsltwin32config.h", |  69     "libxslt/xsltwin32config.h", | 
|  57     "linux/config.h", |  70     "linux/config.h", | 
|  58     "mac/config.h", |  71     "mac/config.h", | 
|  59     "win32/config.h", |  72     "win32/config.h", | 
|  60   ] |  73   ] | 
|  61  |  74  | 
|  62   config("libxslt_warnings") { |  75   configs -= [ "//build/config/compiler:chromium_code" ] | 
|  63     if (is_clang) { |  76   configs += [ | 
|  64       cflags = [ |  77     "//build/config/compiler:no_chromium_code", | 
|  65         # libxslt stores a char[3] in a `const unsigned char*`. |  | 
|  66         "-Wno-pointer-sign", |  | 
|  67  |  78  | 
|  68         # xsltDefaultRegion and xsltCalibrateTimestamps are only |  79     # Must be after no_chromium_code for warning flags to be ordered correctly. | 
|  69         # used with certain preprocessor defines set. |  80     ":libxslt_warnings", | 
|  70         "-Wno-unused-function", |  81   ] | 
|  71       ] |  | 
|  72     } |  | 
|  73   } |  | 
|  74   configs -= [ "//build/config/compiler:chromium_code" ] |  | 
|  75   configs += [ "//build/config/compiler:no_chromium_code" ] |  | 
|  76   configs += [ ":libxslt_warnings" ] |  | 
|  77   public_configs = [ ":libxslt_config" ] |  82   public_configs = [ ":libxslt_config" ] | 
|  78  |  83  | 
|  79   cflags = [] |  84   cflags = [] | 
|  80   if (is_linux || is_android) { |  85   if (is_linux || is_android) { | 
|  81     include_dirs = [ "linux" ] |  86     include_dirs = [ "linux" ] | 
|  82   } else if (is_win) { |  87   } else if (is_win) { | 
|  83     include_dirs = [ "win32" ] |  88     include_dirs = [ "win32" ] | 
|  84     cflags += [ "/wd4267" ]  # size_t to int. |  89     cflags += [ "/wd4267" ]  # size_t to int. | 
|  85   } else if (is_mac) { |  90   } else if (is_mac) { | 
|  86     include_dirs = [ "mac" ] |  91     include_dirs = [ "mac" ] | 
|  87   } |  92   } | 
|  88  |  93  | 
|  89   deps = [ |  94   deps = [ | 
|  90     "//third_party/libxml", |  95     "//third_party/libxml", | 
|  91   ] |  96   ] | 
|  92 } |  97 } | 
| OLD | NEW |