cc: Added inline to Tile::IsReadyToDraw
[chromium-blink-merge.git] / third_party / libexif / libexif.gyp
blob20aa2271ebdde7eccddd3df903f9dcac5fe2602f
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       # TODO(kmadhusu): We are not ready to build this library on Android.
9       # Resolve the issues and build on Android.
10       ['os_posix==1 and OS!="mac"', {
11         'use_system_libexif%': 0,
12       }, {  # os_posix != 1 or OS == "mac"
13         'use_system_libexif%': 0,
14       }],
15     ],
16   },
17   'conditions': [
18     ['use_system_libexif==0', {
19       'targets': [
20         {
21           'target_name': 'libexif',
22           'type': 'shared_library',
23           'product_name': 'exif',
24           'sources': [
25             'sources/libexif/exif-byte-order.c',
26             'sources/libexif/exif-content.c',
27             'sources/libexif/exif-data.c',
28             'sources/libexif/exif-entry.c',
29             'sources/libexif/exif-format.c',
30             'sources/libexif/exif-ifd.c',
31             'sources/libexif/exif-loader.c',
32             'sources/libexif/exif-log.c',
33             'sources/libexif/exif-mem.c',
34             'sources/libexif/exif-mnote-data.c',
35             'sources/libexif/exif-tag.c',
36             'sources/libexif/exif-utils.c',
37             'sources/libexif/canon/exif-mnote-data-canon.c',
38             'sources/libexif/canon/mnote-canon-entry.c',
39             'sources/libexif/canon/mnote-canon-tag.c',
40             'sources/libexif/fuji/exif-mnote-data-fuji.c',
41             'sources/libexif/fuji/mnote-fuji-entry.c',
42             'sources/libexif/fuji/mnote-fuji-tag.c',
43             'sources/libexif/olympus/exif-mnote-data-olympus.c',
44             'sources/libexif/olympus/mnote-olympus-entry.c',
45             'sources/libexif/olympus/mnote-olympus-tag.c',
46             'sources/libexif/pentax/exif-mnote-data-pentax.c',
47             'sources/libexif/pentax/mnote-pentax-entry.c',
48             'sources/libexif/pentax/mnote-pentax-tag.c',
49           ],
50           'include_dirs': [
51             'sources',
52           ],
53           'direct_dependent_settings': {
54             'include_dirs': [
55               'sources',
56             ],
57           },
58           'conditions': [
59             ['os_posix==1 and OS!="mac"', {
60               'cflags!': ['-fvisibility=hidden'],
61             }],
62             ['OS=="mac"', {
63               'conditions': [
64                ['mac_breakpad==1', {
65                   'variables': {
66                     'mac_real_dsym': 1,
67                   },
68                }],
69              ],
70              'xcode_settings': {
71                 'GCC_SYMBOLS_PRIVATE_EXTERN': 'NO', # no -fvisibility=hidden
72                 # TODO(kmadhusu): Copy this dylib to Versions folder.
73                 # (Do something similar to libplugin_carbon_interpose.dylib).
74                 'DYLIB_INSTALL_NAME_BASE': '@executable_path/../../..',
75               },
76             }],
77             ['OS=="win"', {
78               'product_name': 'libexif',
79               'msvs_settings': {
80                 'VCLinkerTool': {
81                   'ModuleDefinitionFile': 'libexif.def',
82                 },
83               },
84               'defines': [
85                 # This seems like a hack, but this is what WebKit Win does.
86                 'snprintf=_snprintf',
87                 'inline=__inline',
88               ],
89             }],
90           ],
91         },
92       ],
93     }, { # 'use_system_libexif==0
94       'conditions': [
95         ['sysroot!=""', {
96           'variables': {
97             'pkg-config': '../../build/linux/pkg-config-wrapper "<(sysroot)" "<(target_arch)"',
98           },
99         }, {
100           'variables': {
101             'pkg-config': 'pkg-config'
102           },
103         }],
104       ],
105       'targets': [
106         {
107           'target_name': 'libexif',
108           'type': 'none',
109           'direct_dependent_settings': {
110             'cflags': [
111                 '<!@(<(pkg-config) --cflags libexif)',
112             ],
113             'defines': [
114               'USE_SYSTEM_LIBEXIF',
115             ],
116           },
117           'link_settings': {
118             'ldflags': [
119               '<!@(<(pkg-config) --libs-only-L --libs-only-other libexif)',
120             ],
121             'libraries': [
122               '<!@(<(pkg-config) --libs-only-l libexif)',
123             ],
124           },
125         }
126       ],
127     }],
128   ]