Chromium Code Reviews| 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': '@loader_path', |
|
tommycli
2014/03/27 23:26:10
I changed this from @executable_path/../../.. beca
| |
| 73 # (Do something similar to libplugin_carbon_interpose.dylib). | |
| 74 'DYLIB_INSTALL_NAME_BASE': '@executable_path/../../..', | |
| 75 }, | 87 }, |
| 88 'postbuilds': [ | |
|
tommycli
2014/03/27 23:26:10
I also copied this from chrome.gyp:678 because it
| |
| 89 { | |
| 90 # The framework (chrome_dll) defines its load-time path | |
| 91 # (DYLIB_INSTALL_NAME_BASE) relative to the main executable | |
| 92 # (chrome). A different relative path needs to be used in | |
| 93 # libexif, which runs in the helper_app. | |
| 94 'postbuild_name': 'Fix Framework Link', | |
| 95 'action': [ | |
| 96 'install_name_tool', | |
| 97 '-change', | |
| 98 '@executable_path/../Versions/<(version_full)/<(mac_product_ name) Framework.framework/<(mac_product_name) Framework', | |
| 99 '@executable_path/../../../<(mac_product_name) Framework.fra mework/<(mac_product_name) Framework', | |
| 100 '${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}' | |
| 101 ], | |
| 102 }, | |
| 103 ], | |
| 76 }], | 104 }], |
| 77 ['OS=="win"', { | 105 ['OS=="win"', { |
| 78 'product_name': 'libexif', | 106 'product_name': 'libexif', |
| 79 'msvs_settings': { | 107 'sources': [ |
| 80 'VCLinkerTool': { | 108 'libexif.def', |
| 81 'ModuleDefinitionFile': 'libexif.def', | 109 ], |
| 82 }, | |
| 83 }, | |
| 84 'defines': [ | 110 'defines': [ |
| 85 # This seems like a hack, but this is what WebKit Win does. | 111 # This seems like a hack, but this is what WebKit Win does. |
| 86 'snprintf=_snprintf', | 112 'snprintf=_snprintf', |
| 87 'inline=__inline', | 113 'inline=__inline', |
| 88 ], | 114 ], |
| 115 'msvs_disabled_warnings': [ | |
| 116 4267, # size_t -> ExifLong truncation on amd64 | |
| 117 ], | |
| 89 }], | 118 }], |
| 90 ], | 119 ], |
| 91 }, | 120 }, |
| 92 ], | 121 ], |
| 93 }, { # 'use_system_libexif==0 | 122 }, { # 'use_system_libexif==0 |
| 94 'conditions': [ | 123 'conditions': [ |
| 95 ['sysroot!=""', { | 124 ['sysroot!=""', { |
| 96 'variables': { | 125 'variables': { |
| 97 'pkg-config': '../../build/linux/pkg-config-wrapper "<(sysroot)" "<( target_arch)"', | 126 'pkg-config': '../../build/linux/pkg-config-wrapper "<(sysroot)" "<( target_arch)"', |
| 98 }, | 127 }, |
| (...skipping 21 matching lines...) Expand all Loading... | |
| 120 ], | 149 ], |
| 121 'libraries': [ | 150 'libraries': [ |
| 122 '<!@(<(pkg-config) --libs-only-l libexif)', | 151 '<!@(<(pkg-config) --libs-only-l libexif)', |
| 123 ], | 152 ], |
| 124 }, | 153 }, |
| 125 } | 154 } |
| 126 ], | 155 ], |
| 127 }], | 156 }], |
| 128 ] | 157 ] |
| 129 } | 158 } |
| OLD | NEW |