Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1796)

Unified Diff: third_party/libpng/libpng.gyp

Issue 14203006: Extract use_system_foo logic out of gyp files, patch 2 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/libpng/libpng.gyp
diff --git a/third_party/libpng/libpng.gyp b/third_party/libpng/libpng.gyp
index 789778b39777debcbf7bb661d9627472775168fb..38082f4e0e0b7084a3a64b0b303f5254eaec5f9c 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'],
+ }],
],
- }],
- ],
+ },
+ ]
}

Powered by Google App Engine
This is Rietveld 408576698