OLD | NEW |
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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 { | 5 { |
6 'variables': { | 6 'variables': { |
7 'conditions': [ | 7 'conditions': [ |
8 ['OS == "linux"', { | 8 # TODO(kmadhusu): We are not ready to build this library on Android. |
9 'use_system_libexif%': 1, | 9 # Resolve the issues and build on Android. |
10 }, { # OS != "linux" | 10 ['os_posix==1 and OS!="mac"', { |
| 11 'use_system_libexif%': 0, |
| 12 }, { # os_posix != 1 or OS == "mac" |
11 'use_system_libexif%': 0, | 13 'use_system_libexif%': 0, |
12 }], | 14 }], |
13 ], | 15 ], |
14 }, | 16 }, |
15 'includes': [ | |
16 '../../build/util/version.gypi', | |
17 ], | |
18 'conditions': [ | 17 'conditions': [ |
19 ['use_system_libexif==0', { | 18 ['use_system_libexif==0', { |
20 'targets': [ | 19 'targets': [ |
21 { | 20 { |
22 'target_name': 'libexif', | 21 'target_name': 'libexif', |
23 'type': 'shared_library', | 22 'type': 'shared_library', |
24 'product_name': 'exif', | 23 'product_name': 'exif', |
25 'sources': [ | 24 'sources': [ |
26 'sources/libexif/exif-byte-order.c', | 25 'sources/libexif/exif-byte-order.c', |
27 'sources/libexif/exif-content.c', | 26 'sources/libexif/exif-content.c', |
(...skipping 22 matching lines...) Expand all Loading... |
50 ], | 49 ], |
51 'include_dirs': [ | 50 'include_dirs': [ |
52 'sources', | 51 'sources', |
53 ], | 52 ], |
54 'direct_dependent_settings': { | 53 'direct_dependent_settings': { |
55 'include_dirs': [ | 54 'include_dirs': [ |
56 'sources', | 55 'sources', |
57 ], | 56 ], |
58 }, | 57 }, |
59 'conditions': [ | 58 'conditions': [ |
60 ['clang==1', { | |
61 'cflags': [ | |
62 '-Wno-enum-conversion', | |
63 '-Wno-switch' | |
64 ], | |
65 'xcode_settings': { | |
66 'WARNING_CFLAGS': [ | |
67 '-Wno-enum-conversion', | |
68 '-Wno-switch', | |
69 '-Wno-format', | |
70 ], | |
71 }, | |
72 }], | |
73 ['os_posix==1 and OS!="mac"', { | 59 ['os_posix==1 and OS!="mac"', { |
74 'cflags!': ['-fvisibility=hidden'], | 60 'cflags!': ['-fvisibility=hidden'], |
75 }], | 61 }], |
76 ['OS=="mac"', { | 62 ['OS=="mac"', { |
77 'conditions': [ | 63 'conditions': [ |
78 ['mac_breakpad==1', { | 64 ['mac_breakpad==1', { |
79 'variables': { | 65 'variables': { |
80 'mac_real_dsym': 1, | 66 'mac_real_dsym': 1, |
81 }, | 67 }, |
82 }], | 68 }], |
83 ], | 69 ], |
84 'xcode_settings': { | 70 'xcode_settings': { |
85 'GCC_SYMBOLS_PRIVATE_EXTERN': 'NO', # no -fvisibility=hidden | 71 'GCC_SYMBOLS_PRIVATE_EXTERN': 'NO', # no -fvisibility=hidden |
86 'DYLIB_INSTALL_NAME_BASE': '@rpath', | 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/../../..', |
87 }, | 75 }, |
88 }], | 76 }], |
89 ['OS=="win"', { | 77 ['OS=="win"', { |
90 'product_name': 'libexif', | 78 'product_name': 'libexif', |
91 'sources': [ | 79 'msvs_settings': { |
92 'libexif.def', | 80 'VCLinkerTool': { |
93 ], | 81 'ModuleDefinitionFile': 'libexif.def', |
| 82 }, |
| 83 }, |
94 'defines': [ | 84 'defines': [ |
95 # This seems like a hack, but this is what WebKit Win does. | 85 # This seems like a hack, but this is what WebKit Win does. |
96 'snprintf=_snprintf', | 86 'snprintf=_snprintf', |
97 'inline=__inline', | 87 'inline=__inline', |
98 ], | 88 ], |
99 'msvs_disabled_warnings': [ | |
100 4267, # size_t -> ExifLong truncation on amd64 | |
101 ], | |
102 }], | 89 }], |
103 ], | 90 ], |
104 }, | 91 }, |
105 ], | 92 ], |
106 }, { # 'use_system_libexif==0 | 93 }, { # 'use_system_libexif==0 |
107 'conditions': [ | 94 'conditions': [ |
108 ['sysroot!=""', { | 95 ['sysroot!=""', { |
109 'variables': { | 96 'variables': { |
110 'pkg-config': '../../build/linux/pkg-config-wrapper "<(sysroot)" "<(
target_arch)"', | 97 'pkg-config': '../../build/linux/pkg-config-wrapper "<(sysroot)" "<(
target_arch)"', |
111 }, | 98 }, |
(...skipping 21 matching lines...) Expand all Loading... |
133 ], | 120 ], |
134 'libraries': [ | 121 'libraries': [ |
135 '<!@(<(pkg-config) --libs-only-l libexif)', | 122 '<!@(<(pkg-config) --libs-only-l libexif)', |
136 ], | 123 ], |
137 }, | 124 }, |
138 } | 125 } |
139 ], | 126 ], |
140 }], | 127 }], |
141 ] | 128 ] |
142 } | 129 } |
OLD | NEW |