1 # Copyright (c) 2009 The Chromium Authors. All rights reserved. 2 # Use of this source code is governed by a BSD-style license that can be 3 # found in the LICENSE file. 4 5 { 6 # This file handles building both with our local libjpeg and with the system 7 # libjpeg. 8 'conditions': [ 9 ['use_system_libjpeg==0', { 10 'targets': [ 11 { 12 'target_name': 'libjpeg', 13 'type': 'static_library', 14 'sources': [ 15 'jcapimin.c', 16 'jcapistd.c', 17 'jccoefct.c', 18 'jccolor.c', 19 'jcdctmgr.c', 20 'jchuff.c', 21 'jchuff.h', 22 'jcinit.c', 23 'jcmainct.c', 24 'jcmarker.c', 25 'jcmaster.c', 26 'jcomapi.c', 27 'jconfig.h', 28 'jcparam.c', 29 'jcphuff.c', 30 'jcprepct.c', 31 'jcsample.c', 32 'jdapimin.c', 33 'jdapistd.c', 34 'jdatadst.c', 35 'jdatasrc.c', 36 'jdcoefct.c', 37 'jdcolor.c', 38 'jdct.h', 39 'jddctmgr.c', 40 'jdhuff.c', 41 'jdhuff.h', 42 'jdinput.c', 43 'jdmainct.c', 44 'jdmarker.c', 45 'jdmaster.c', 46 'jdmerge.c', 47 'jdphuff.c', 48 'jdpostct.c', 49 'jdsample.c', 50 'jerror.c', 51 'jerror.h', 52 'jfdctflt.c', 53 'jfdctfst.c', 54 'jfdctint.c', 55 'jidctflt.c', 56 'jidctfst.c', 57 'jidctint.c', 58 'jinclude.h', 59 'jmemmgr.c', 60 'jmemnobs.c', 61 'jmemsys.h', 62 'jmorecfg.h', 63 'jpegint.h', 64 'jpeglib.h', 65 'jquant1.c', 66 'jquant2.c', 67 'jutils.c', 68 'jversion.h', 69 ], 70 'direct_dependent_settings': { 71 'include_dirs': [ 72 '.', 73 ], 74 }, 75 'conditions': [ 76 ['OS!="win"', {'product_name': 'jpeg'}], 77 ], 78 }, 79 ], 80 }, { 81 'targets': [ 82 { 83 'target_name': 'libjpeg', 84 'type': 'none', 85 'direct_dependent_settings': { 86 'defines': [ 87 'USE_SYSTEM_LIBJPEG', 88 ], 89 'conditions': [ 90 ['os_bsd==1', { 91 'include_dirs': [ 92 '/usr/local/include', 93 ], 94 }], 95 ['OS=="android"', { 96 'include_dirs': [ 97 '<(android_src)/external/jpeg', 98 ], 99 }], 100 ], 101 }, 102 'link_settings': { 103 'libraries': [ 104 '-ljpeg', 105 ], 106 }, 107 } 108 ], 109 }], 110 ], 111 } 112