Moved current cloud_devices content into cloud_devices/common.
[chromium-blink-merge.git] / third_party / libpng / BUILD.gn
blob4ec38d1adc0277eaf37b416947a5d729f20c50c5
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
3 # found in the LICENSE file.
5 config("libpng_config") {
6   include_dirs = [
7     ".",
8   ]
10   defines = [
11     "CHROME_PNG_WRITE_SUPPORT",
12     "PNG_USER_CONFIG",
13   ]
15   if (is_android) {
16     #'toolsets': ['target', 'host'],
17     defines += [
18       "CHROME_PNG_READ_PACK_SUPPORT",  # Required by freetype.
19     ]
20   }
22   if (is_win) {
23     if (component_mode == "shared_library") {
24       defines += [
25         "PNG_USE_DLL",
26         "PNG_NO_MODULEDEF",
27       ]
28     }
29   }
32 static_library("libpng") {
33   sources =  [
34     "png.c",
35     "png.h",
36     "pngconf.h",
37     "pngerror.c",
38     "pnggccrd.c",
39     "pngget.c",
40     "pngmem.c",
41     "pngpread.c",
42     "pngread.c",
43     "pngrio.c",
44     "pngrtran.c",
45     "pngrutil.c",
46     "pngset.c",
47     "pngtrans.c",
48     "pngusr.h",
49     "pngvcrd.c",
50     "pngwio.c",
51     "pngwrite.c",
52     "pngwtran.c",
53     "pngwutil.c",
54   ]
56   configs -= [ "//build/config/compiler:chromium_code" ]
57   configs += [ "//build/config/compiler:no_chromium_code" ]
59   forward_dependent_configs_from = [ "//third_party/zlib" ]
61   direct_dependent_configs = [ ":libpng_config" ]
63   deps =  [
64     "//third_party/zlib",
65   ]