Parse background_color from the Manifest
[chromium-blink-merge.git] / third_party / libexif / libexif.gyp
blob510e6f5b5b412fe5169d7b6294e739e026bf46bc
1 # Copyright (c) 2012 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.
6   'variables': {
7     'conditions': [
8       ['OS == "linux" and chromeos==0', {
9         'use_system_libexif%': 1,
10       }, {  # OS != "linux" and chromeos==0
11         'use_system_libexif%': 0,
12       }],
13     ],
14   },
15   'conditions': [
16     ['use_system_libexif==0', {
17       'targets': [
18         {
19           'target_name': 'libexif',
20           'type': 'loadable_module',
21           'sources': [
22             'sources/libexif/exif-byte-order.c',
23             'sources/libexif/exif-content.c',
24             'sources/libexif/exif-data.c',
25             'sources/libexif/exif-entry.c',
26             'sources/libexif/exif-format.c',
27             'sources/libexif/exif-ifd.c',
28             'sources/libexif/exif-loader.c',
29             'sources/libexif/exif-log.c',
30             'sources/libexif/exif-mem.c',
31             'sources/libexif/exif-mnote-data.c',
32             'sources/libexif/exif-tag.c',
33             'sources/libexif/exif-utils.c',
34             'sources/libexif/canon/exif-mnote-data-canon.c',
35             'sources/libexif/canon/mnote-canon-entry.c',
36             'sources/libexif/canon/mnote-canon-tag.c',
37             'sources/libexif/fuji/exif-mnote-data-fuji.c',
38             'sources/libexif/fuji/mnote-fuji-entry.c',
39             'sources/libexif/fuji/mnote-fuji-tag.c',
40             'sources/libexif/olympus/exif-mnote-data-olympus.c',
41             'sources/libexif/olympus/mnote-olympus-entry.c',
42             'sources/libexif/olympus/mnote-olympus-tag.c',
43             'sources/libexif/pentax/exif-mnote-data-pentax.c',
44             'sources/libexif/pentax/mnote-pentax-entry.c',
45             'sources/libexif/pentax/mnote-pentax-tag.c',
46           ],
47           'include_dirs': [
48             'sources',
49           ],
50           'direct_dependent_settings': {
51             'include_dirs': [
52               'sources',
53             ],
54           },
55           'variables': {
56             'clang_warning_flags': [
57               '-Wno-enum-conversion',
58               '-Wno-switch',
59               '-Wno-format',
60               # libexif uses fabs(int) to cast to float.
61               '-Wno-absolute-value',
62             ],
63           },
64           'conditions': [
65             ['os_posix==1 and OS!="mac"', {
66               'cflags!': ['-fvisibility=hidden'],
67               'libraries': ['-lm'],
68             }],
69             ['OS=="mac"', {
70               'conditions': [
71                ['mac_breakpad==1', {
72                   'variables': {
73                     'mac_real_dsym': 1,
74                   },
75                }],
76               ],
77               'xcode_settings': {
78                 'GCC_SYMBOLS_PRIVATE_EXTERN': 'NO', # no -fvisibility=hidden
79               },
80             }],
81             ['OS=="win"', {
82               'product_name': 'libexif',
83               'sources': [
84                 'libexif.def',
85               ],
86               'conditions': [
87                 ['MSVS_VERSION < "2015"', {
88                   'defines': [
89                     # This seems like a hack, but this is what Safari Win does.
90                     # Luckily it is no longer needed/allowed with VS 2015.
91                     'snprintf=_snprintf',
92                   ],
93                 }],
94               ],
95               'defines': [
96                 'inline=__inline',
97               ],
98               'msvs_disabled_warnings': [
99                 4018, # size/unsigned mismatch
100                 4267, # size_t -> ExifLong truncation on amd64
101               ],
102               # As of VS 2013 Update 3, building this project with /analyze hits
103               # an internal compiler error on exif-entry.c. This halts the build
104               # and prevents subsequent analysis. Therefore, /analyze is
105               # disabled for this project. See this bug for details:
106               # https://connect.microsoft.com/VisualStudio/feedback/details/1014689/internal-compiler-error
107               'msvs_settings': {
108                 'VCCLCompilerTool': {
109                   'AdditionalOptions!': [ '/analyze:WX-' ]
110                 },
111               },
112             }],
113           ],
114         },
115       ],
116     }, { # 'use_system_libexif!=0
117       'targets': [
118         {
119           'target_name': 'libexif',
120           'type': 'none',
121           'direct_dependent_settings': {
122             'cflags': [
123                 '<!@(<(pkg-config) --cflags libexif)',
124             ],
125             'defines': [
126               'USE_SYSTEM_LIBEXIF',
127             ],
128           },
129         }
130       ],
131     }],
132   ]