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