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

Unified Diff: third_party/libpng/libpng.gyp

Issue 159229: Linux: add GYP variable to use the system libpng. (Closed)
Patch Set: updated to (hopefully) final style Created 11 years, 5 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
« no previous file with comments | « base/gfx/png_encoder.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/libpng/libpng.gyp
diff --git a/third_party/libpng/libpng.gyp b/third_party/libpng/libpng.gyp
index 63bd9d7a7895d9b17e1c65e7a2740996b38822c7..03320e8f92c5e72e91ecbc257107b6c220db8758 100644
--- a/third_party/libpng/libpng.gyp
+++ b/third_party/libpng/libpng.gyp
@@ -6,55 +6,88 @@
'includes': [
'../../build/common.gypi',
],
- 'targets': [
- {
- 'target_name': 'libpng',
- 'type': '<(library)',
- 'dependencies': [
- '../zlib/zlib.gyp:zlib',
+ 'variables': {
+ 'use_system_libpng%': 0,
+ },
+ 'conditions': [
+ ['use_system_libpng==0', {
+ 'targets': [
+ {
+ 'target_name': 'libpng',
+ 'type': '<(library)',
+ 'dependencies': [
+ '../zlib/zlib.gyp:zlib',
+ ],
+ 'defines': [
+ 'CHROME_PNG_WRITE_SUPPORT',
+ 'PNG_USER_CONFIG',
+ ],
+ 'msvs_guid': 'C564F145-9172-42C3-BFCB-6014CA97DBCD',
+ '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',
+ ],
+ 'conditions': [
+ ['OS!="win"', {'product_name': 'png'}],
+ ],
+ },
+ ]
+ }, {
+ 'targets': [
+ {
+ 'target_name': 'libpng',
+ 'type': '<(library)',
+ 'dependencies': [
+ '../zlib/zlib.gyp:zlib',
+ ],
+ 'defines': [
+ 'USE_SYSTEM_LIBPNG',
+ ],
+ '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)',
+ ],
+ },
+ },
],
- 'defines': [
- 'CHROME_PNG_WRITE_SUPPORT',
- 'PNG_USER_CONFIG',
- ],
- 'msvs_guid': 'C564F145-9172-42C3-BFCB-6014CA97DBCD',
- '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',
- ],
- 'conditions': [
- ['OS!="win"', {'product_name': 'png'}],
- ],
- },
+ }],
],
}
« no previous file with comments | « base/gfx/png_encoder.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698