From ed517f39f6664c1c6ab0db0385176efa3b8f8e05 Mon Sep 17 00:00:00 2001 From: "agl@chromium.org" Date: Thu, 6 Aug 2009 19:58:12 +0000 Subject: Linux: add GYP flag to build with system jpeg. This follows the general style of r21663, which we agreed was the way to do this. http://codereview.chromium.org/164080 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22645 0039d316-1c4b-4281-b951-d872f2087c98 --- third_party/libjpeg/libjpeg.gyp | 160 +++++++++++++++++++++++----------------- 1 file changed, 92 insertions(+), 68 deletions(-) (limited to 'third_party/libjpeg') diff --git a/third_party/libjpeg/libjpeg.gyp b/third_party/libjpeg/libjpeg.gyp index 87f9937..64455b0 100644 --- a/third_party/libjpeg/libjpeg.gyp +++ b/third_party/libjpeg/libjpeg.gyp @@ -6,75 +6,99 @@ 'includes': [ '../../build/common.gypi', ], - 'targets': [ - { - 'target_name': 'libjpeg', - 'type': '<(library)', - 'msvs_guid': '238CE175-76CE-4A25-A676-69D115885601', - 'sources': [ - 'jcapimin.c', - 'jcapistd.c', - 'jccoefct.c', - 'jccolor.c', - 'jcdctmgr.c', - 'jchuff.c', - 'jchuff.h', - 'jcinit.c', - 'jcmainct.c', - 'jcmarker.c', - 'jcmaster.c', - 'jcomapi.c', - 'jconfig.h', - 'jcparam.c', - 'jcphuff.c', - 'jcprepct.c', - 'jcsample.c', - 'jdapimin.c', - 'jdapistd.c', - 'jdatadst.c', - 'jdatasrc.c', - 'jdcoefct.c', - 'jdcolor.c', - 'jdct.h', - 'jddctmgr.c', - 'jdhuff.c', - 'jdhuff.h', - 'jdinput.c', - 'jdmainct.c', - 'jdmarker.c', - 'jdmaster.c', - 'jdmerge.c', - 'jdphuff.c', - 'jdpostct.c', - 'jdsample.c', - 'jerror.c', - 'jerror.h', - 'jfdctflt.c', - 'jfdctfst.c', - 'jfdctint.c', - 'jidctflt.c', - 'jidctfst.c', - 'jidctint.c', - 'jinclude.h', - 'jmemmgr.c', - 'jmemnobs.c', - 'jmemsys.h', - 'jmorecfg.h', - 'jpegint.h', - 'jpeglib.h', - 'jquant1.c', - 'jquant2.c', - 'jutils.c', - 'jversion.h', + 'variables': { + 'use_system_libjpeg%': 0, + }, + 'conditions': [ + ['use_system_libjpeg==0', { + 'targets': [ + { + 'target_name': 'libjpeg', + 'type': '<(library)', + 'msvs_guid': '238CE175-76CE-4A25-A676-69D115885601', + 'sources': [ + 'jcapimin.c', + 'jcapistd.c', + 'jccoefct.c', + 'jccolor.c', + 'jcdctmgr.c', + 'jchuff.c', + 'jchuff.h', + 'jcinit.c', + 'jcmainct.c', + 'jcmarker.c', + 'jcmaster.c', + 'jcomapi.c', + 'jconfig.h', + 'jcparam.c', + 'jcphuff.c', + 'jcprepct.c', + 'jcsample.c', + 'jdapimin.c', + 'jdapistd.c', + 'jdatadst.c', + 'jdatasrc.c', + 'jdcoefct.c', + 'jdcolor.c', + 'jdct.h', + 'jddctmgr.c', + 'jdhuff.c', + 'jdhuff.h', + 'jdinput.c', + 'jdmainct.c', + 'jdmarker.c', + 'jdmaster.c', + 'jdmerge.c', + 'jdphuff.c', + 'jdpostct.c', + 'jdsample.c', + 'jerror.c', + 'jerror.h', + 'jfdctflt.c', + 'jfdctfst.c', + 'jfdctint.c', + 'jidctflt.c', + 'jidctfst.c', + 'jidctint.c', + 'jinclude.h', + 'jmemmgr.c', + 'jmemnobs.c', + 'jmemsys.h', + 'jmorecfg.h', + 'jpegint.h', + 'jpeglib.h', + 'jquant1.c', + 'jquant2.c', + 'jutils.c', + 'jversion.h', + ], + 'direct_dependent_settings': { + 'include_dirs': [ + '.', + ], + }, + 'conditions': [ + ['OS!="win"', {'product_name': 'jpeg'}], + ], + }, ], - 'direct_dependent_settings': { - 'include_dirs': [ - '.', - ], - }, - 'conditions': [ - ['OS!="win"', {'product_name': 'jpeg'}], + }, { + 'targets': [ + { + 'target_name': 'libjpeg', + 'type': 'settings', + 'direct_dependent_settings': { + 'defines': [ + 'USE_SYSTEM_LIBJPEG', + ], + }, + 'link_settings': { + 'libraries': [ + '-ljpeg', + ], + }, + } ], - }, + }], ], } -- cgit v1.1