Migrate away from the PrefMetricsService-based device ID in PrefHashCalculator.
[chromium-blink-merge.git] / third_party / libexif / libexif.gyp
blob5819b3ae8e6ca6e8011d44be03bd2518ab6a6cb9
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           'conditions': [
56             ['clang==1', {
57               'cflags': [
58                 '-Wno-enum-conversion', 
59                 '-Wno-switch',
60                 # libexif uses fabs(int) to cast to float.
61                 '-Wno-absolute-value',
62               ],
63               'xcode_settings': {
64                 'WARNING_CFLAGS': [
65                   '-Wno-enum-conversion', 
66                   '-Wno-switch',
67                   '-Wno-format',
68                   # libexif uses fabs(int) to cast to float.
69                   '-Wno-absolute-value',
70                 ],
71               },
72             }],
73             ['os_posix==1 and OS!="mac"', {
74               'cflags!': ['-fvisibility=hidden'],
75             }],
76             ['OS=="mac"', {
77               'conditions': [
78                ['mac_breakpad==1', {
79                   'variables': {
80                     'mac_real_dsym': 1,
81                   },
82                }],
83               ],
84               'xcode_settings': {
85                 'GCC_SYMBOLS_PRIVATE_EXTERN': 'NO', # no -fvisibility=hidden
86               },
87             }],
88             ['OS=="win"', {
89               'product_name': 'libexif',
90               'sources': [
91                 'libexif.def',
92               ],
93               'defines': [
94                 # This seems like a hack, but this is what WebKit Win does.
95                 'snprintf=_snprintf',
96                 'inline=__inline',
97               ],
98               'msvs_disabled_warnings': [
99                 4018, # size/unsigned mismatch
100                 4267, # size_t -> ExifLong truncation on amd64
101               ],
102             }],
103           ],
104         },
105       ],
106     }, { # 'use_system_libexif!=0
107       'conditions': [
108         ['sysroot!=""', {
109           'variables': {
110             'pkg-config': '../../build/linux/pkg-config-wrapper "<(sysroot)" "<(target_arch)" "<(system_libdir)"',
111           },
112         }, {
113           'variables': {
114             'pkg-config': 'pkg-config'
115           },
116         }],
117       ],
118       'targets': [
119         {
120           'target_name': 'libexif',
121           'type': 'none',
122           'direct_dependent_settings': {
123             'cflags': [
124                 '<!@(<(pkg-config) --cflags libexif)',
125             ],
126             'defines': [
127               'USE_SYSTEM_LIBEXIF',
128             ],
129           },
130         }
131       ],
132     }],
133   ]