summaryrefslogtreecommitdiffstats
path: root/third_party/libpng
diff options
context:
space:
mode:
authorphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-26 00:20:29 +0000
committerphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-26 00:20:29 +0000
commit944cab8c2053844039d0e44ddcdcc489ba2b1d6c (patch)
tree7a6ce5e91643a7054a6d0509951d8fa9c9007b06 /third_party/libpng
parent74f50486fe54b57cb9ac2813aa97ff9e5dda4c94 (diff)
downloadchromium_src-944cab8c2053844039d0e44ddcdcc489ba2b1d6c.zip
chromium_src-944cab8c2053844039d0e44ddcdcc489ba2b1d6c.tar.gz
chromium_src-944cab8c2053844039d0e44ddcdcc489ba2b1d6c.tar.bz2
Extract use_system_foo logic out of gyp files, patch 2
This removes use_system_foo logic completely from: * jsoncpp.gyp * libevent.gyp * libpng.gyp * libusb.gyp * libwebp.gyp * opus.gyp * re2.gyp * zlib.gyp R=rsleevi TBR=darin BUG=226860 Review URL: https://codereview.chromium.org/14203006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@196551 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'third_party/libpng')
-rw-r--r--third_party/libpng/libpng.gyp189
1 files changed, 65 insertions, 124 deletions
diff --git a/third_party/libpng/libpng.gyp b/third_party/libpng/libpng.gyp
index 789778b..38082f4 100644
--- a/third_party/libpng/libpng.gyp
+++ b/third_party/libpng/libpng.gyp
@@ -3,135 +3,76 @@
# found in the LICENSE file.
{
- 'variables': {
- 'conditions': [
- [ 'os_posix == 1 and OS != "mac" and OS != "android"', {
- # Maybe link to system .so once the security concerns are thought
- # through, since we already use it due to GTK.
- 'use_system_libpng%': 0,
- }, { # os_posix != 1 or OS == "mac"
- 'use_system_libpng%': 0,
- }],
- ],
- },
- 'conditions': [
- ['use_system_libpng==0', {
- 'targets': [
- {
- 'target_name': 'libpng',
- 'dependencies': [
- '../zlib/zlib.gyp:zlib',
- ],
- 'defines': [
- 'CHROME_PNG_WRITE_SUPPORT',
- 'PNG_USER_CONFIG',
- ],
- 'sources': [
- 'png.c',
- 'png.h',
- 'pngconf.h',
- 'pngerror.c',
- 'pnggccrd.c',
- 'pngget.c',
- 'pngmem.c',
- 'pngpread.c',
- 'pngread.c',
- 'pngrio.c',
- 'pngrtran.c',
- 'pngrutil.c',
- 'pngset.c',
- 'pngtrans.c',
- 'pngusr.h',
- 'pngvcrd.c',
- 'pngwio.c',
- 'pngwrite.c',
- 'pngwtran.c',
- 'pngwutil.c',
- ],
- 'direct_dependent_settings': {
- 'include_dirs': [
- '.',
- ],
- 'defines': [
- 'CHROME_PNG_WRITE_SUPPORT',
- 'PNG_USER_CONFIG',
- ],
- },
- 'export_dependent_settings': [
- '../zlib/zlib.gyp:zlib',
- ],
- # TODO(jschuh): http://crbug.com/167187
- 'msvs_disabled_warnings': [ 4267 ],
- 'conditions': [
- ['OS!="win"', {'product_name': 'png'}],
- ['OS=="win"', {
- 'type': '<(component)',
- }, {
- # Chromium libpng does not support building as a shared_library
- # on non-Windows platforms.
- 'type': 'static_library',
- }],
- ['OS=="win" and component=="shared_library"', {
- 'defines': [
- 'PNG_BUILD_DLL',
- 'PNG_NO_MODULEDEF',
- ],
- 'direct_dependent_settings': {
- 'defines': [
- 'PNG_USE_DLL',
- ],
- },
- }],
- ['OS=="android"', {
- 'toolsets': ['target', 'host'],
- }],
- ],
- },
- ]
- }, {
+ 'targets': [
+ {
+ 'target_name': 'libpng',
+ 'dependencies': [
+ '../zlib/zlib.gyp:zlib',
+ ],
+ 'defines': [
+ 'CHROME_PNG_WRITE_SUPPORT',
+ 'PNG_USER_CONFIG',
+ ],
+ 'sources': [
+ 'png.c',
+ 'png.h',
+ 'pngconf.h',
+ 'pngerror.c',
+ 'pnggccrd.c',
+ 'pngget.c',
+ 'pngmem.c',
+ 'pngpread.c',
+ 'pngread.c',
+ 'pngrio.c',
+ 'pngrtran.c',
+ 'pngrutil.c',
+ 'pngset.c',
+ 'pngtrans.c',
+ 'pngusr.h',
+ 'pngvcrd.c',
+ 'pngwio.c',
+ 'pngwrite.c',
+ 'pngwtran.c',
+ 'pngwutil.c',
+ ],
+ 'direct_dependent_settings': {
+ 'include_dirs': [
+ '.',
+ ],
+ 'defines': [
+ 'CHROME_PNG_WRITE_SUPPORT',
+ 'PNG_USER_CONFIG',
+ ],
+ },
+ 'export_dependent_settings': [
+ '../zlib/zlib.gyp:zlib',
+ ],
+ # TODO(jschuh): http://crbug.com/167187
+ 'msvs_disabled_warnings': [ 4267 ],
'conditions': [
- ['sysroot!=""', {
- 'variables': {
- 'pkg-config': '../../build/linux/pkg-config-wrapper "<(sysroot)" "<(target_arch)"',
- },
+ ['OS!="win"', {'product_name': 'png'}],
+ ['OS=="win"', {
+ 'type': '<(component)',
}, {
- 'variables': {
- 'pkg-config': 'pkg-config'
- },
+ # Chromium libpng does not support building as a shared_library
+ # on non-Windows platforms.
+ 'type': 'static_library',
}],
- ],
- 'targets': [
- {
- 'target_name': 'libpng',
- 'type': 'none',
- 'dependencies': [
- '../zlib/zlib.gyp:zlib',
+ ['OS=="win" and component=="shared_library"', {
+ 'defines': [
+ 'PNG_BUILD_DLL',
+ 'PNG_NO_MODULEDEF',
],
'direct_dependent_settings': {
- 'cflags': [
- '<!@(<(pkg-config) --cflags libpng)',
- ],
- },
- 'link_settings': {
- 'ldflags': [
- '<!@(<(pkg-config) --libs-only-L --libs-only-other libpng)',
- ],
- 'libraries': [
- '<!@(<(pkg-config) --libs-only-l libpng)',
- ],
- },
- 'variables': {
- 'headers_root_path': '.',
- 'header_filenames': [
- 'png.h',
- 'pngconf.h',
+ 'defines': [
+ 'PNG_USE_DLL',
],
- },
- 'includes': [
- '../../build/shim_headers.gypi',
- ],
- },
+ },
+ }],
+ ['OS=="android"', {
+ 'toolsets': ['target', 'host'],
+ }],
],
- }],
- ],
+ },
+ ]
}