Chromium Code Reviews| Index: third_party/libexif/libexif.gyp |
| diff --git a/third_party/libexif/libexif.gyp b/third_party/libexif/libexif.gyp |
| index 20aa2271ebdde7eccddd3df903f9dcac5fe2602f..75d9fadf4a909f0822d8f1edd7c041df0d44d4d7 100644 |
| --- a/third_party/libexif/libexif.gyp |
| +++ b/third_party/libexif/libexif.gyp |
| @@ -5,15 +5,16 @@ |
| { |
| 'variables': { |
| 'conditions': [ |
| - # TODO(kmadhusu): We are not ready to build this library on Android. |
| - # Resolve the issues and build on Android. |
| - ['os_posix==1 and OS!="mac"', { |
| - 'use_system_libexif%': 0, |
| - }, { # os_posix != 1 or OS == "mac" |
| + ['OS == "linux"', { |
| + 'use_system_libexif%': 1, |
| + }, { # OS != "linux" |
| 'use_system_libexif%': 0, |
| }], |
| ], |
| }, |
| + 'includes': [ |
| + '../../build/util/version.gypi', |
| + ], |
| 'conditions': [ |
| ['use_system_libexif==0', { |
| 'targets': [ |
| @@ -56,6 +57,19 @@ |
| ], |
| }, |
| 'conditions': [ |
| + ['clang==1', { |
| + 'cflags': [ |
| + '-Wno-enum-conversion', |
| + '-Wno-switch' |
| + ], |
| + 'xcode_settings': { |
| + 'WARNING_CFLAGS': [ |
| + '-Wno-enum-conversion', |
| + '-Wno-switch', |
| + '-Wno-format', |
| + ], |
| + }, |
| + }], |
| ['os_posix==1 and OS!="mac"', { |
| 'cflags!': ['-fvisibility=hidden'], |
| }], |
| @@ -66,26 +80,41 @@ |
| 'mac_real_dsym': 1, |
| }, |
| }], |
| - ], |
| - 'xcode_settings': { |
| + ], |
| + 'xcode_settings': { |
| 'GCC_SYMBOLS_PRIVATE_EXTERN': 'NO', # no -fvisibility=hidden |
| - # TODO(kmadhusu): Copy this dylib to Versions folder. |
| - # (Do something similar to libplugin_carbon_interpose.dylib). |
| - 'DYLIB_INSTALL_NAME_BASE': '@executable_path/../../..', |
| + 'DYLIB_INSTALL_NAME_BASE': '@loader_path', |
|
tommycli
2014/03/27 23:26:10
I changed this from @executable_path/../../.. beca
|
| }, |
| + 'postbuilds': [ |
|
tommycli
2014/03/27 23:26:10
I also copied this from chrome.gyp:678 because it
|
| + { |
| + # The framework (chrome_dll) defines its load-time path |
| + # (DYLIB_INSTALL_NAME_BASE) relative to the main executable |
| + # (chrome). A different relative path needs to be used in |
| + # libexif, which runs in the helper_app. |
| + 'postbuild_name': 'Fix Framework Link', |
| + 'action': [ |
| + 'install_name_tool', |
| + '-change', |
| + '@executable_path/../Versions/<(version_full)/<(mac_product_name) Framework.framework/<(mac_product_name) Framework', |
| + '@executable_path/../../../<(mac_product_name) Framework.framework/<(mac_product_name) Framework', |
| + '${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}' |
| + ], |
| + }, |
| + ], |
| }], |
| ['OS=="win"', { |
| 'product_name': 'libexif', |
| - 'msvs_settings': { |
| - 'VCLinkerTool': { |
| - 'ModuleDefinitionFile': 'libexif.def', |
| - }, |
| - }, |
| + 'sources': [ |
| + 'libexif.def', |
| + ], |
| 'defines': [ |
| # This seems like a hack, but this is what WebKit Win does. |
| 'snprintf=_snprintf', |
| 'inline=__inline', |
| ], |
| + 'msvs_disabled_warnings': [ |
| + 4267, # size_t -> ExifLong truncation on amd64 |
| + ], |
| }], |
| ], |
| }, |