1 # Copyright 2012 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 # This is a copy of ../third_party/externals/libjpeg/libjpeg.gyp , modified 6 # such that all source paths point into that directory. 7 # See http://code.google.com/p/skia/issues/detail?id=543 ('wrap libjpeg.gyp 8 # from Chrome's libjpeg port, rather than making our own copy') for a better 9 # long-term solution. 10 11 { 12 'variables': { 13 'use_system_libjpeg%': 0, 14 'skia_warnings_as_errors': 0, 15 }, 16 'conditions': [ 17 ['skia_os == "android"', { 18 'targets': [ 19 { 20 'target_name': 'libjpeg', 21 'type': 'none', 22 'dependencies': [ 23 'android_deps.gyp:jpeg', 24 ], 25 'export_dependent_settings': [ 26 'android_deps.gyp:jpeg', 27 ], 28 }, 29 ], 30 }, { # skia_os != android 31 'conditions': [ 32 ['use_system_libjpeg==0', { 33 'targets': [ 34 { 35 'target_name': 'libjpeg', 36 'type': 'static_library', 37 'sources': [ 38 # we currently build skia's version of libjpeg-turbo without 39 # SIMD optimizations for simplicity 40 '../third_party/externals/libjpeg/jsimd_none.c', 41 42 '../third_party/externals/libjpeg/jcapimin.c', 43 '../third_party/externals/libjpeg/jcapistd.c', 44 '../third_party/externals/libjpeg/jccoefct.c', 45 '../third_party/externals/libjpeg/jccolor.c', 46 '../third_party/externals/libjpeg/jcdctmgr.c', 47 '../third_party/externals/libjpeg/jchuff.c', 48 '../third_party/externals/libjpeg/jchuff.h', 49 '../third_party/externals/libjpeg/jcinit.c', 50 '../third_party/externals/libjpeg/jcmainct.c', 51 '../third_party/externals/libjpeg/jcmarker.c', 52 '../third_party/externals/libjpeg/jcmaster.c', 53 '../third_party/externals/libjpeg/jcomapi.c', 54 '../third_party/externals/libjpeg/jconfig.h', 55 '../third_party/externals/libjpeg/jcparam.c', 56 '../third_party/externals/libjpeg/jcphuff.c', 57 '../third_party/externals/libjpeg/jcprepct.c', 58 '../third_party/externals/libjpeg/jcsample.c', 59 '../third_party/externals/libjpeg/jdapimin.c', 60 '../third_party/externals/libjpeg/jdapistd.c', 61 '../third_party/externals/libjpeg/jdatadst.c', 62 '../third_party/externals/libjpeg/jdatasrc.c', 63 '../third_party/externals/libjpeg/jdcoefct.c', 64 '../third_party/externals/libjpeg/jdcolor.c', 65 '../third_party/externals/libjpeg/jdct.h', 66 '../third_party/externals/libjpeg/jddctmgr.c', 67 '../third_party/externals/libjpeg/jdhuff.c', 68 '../third_party/externals/libjpeg/jdhuff.h', 69 '../third_party/externals/libjpeg/jdinput.c', 70 '../third_party/externals/libjpeg/jdmainct.c', 71 '../third_party/externals/libjpeg/jdmarker.c', 72 '../third_party/externals/libjpeg/jdmaster.c', 73 '../third_party/externals/libjpeg/jdmerge.c', 74 '../third_party/externals/libjpeg/jdphuff.c', 75 '../third_party/externals/libjpeg/jdpostct.c', 76 '../third_party/externals/libjpeg/jdsample.c', 77 '../third_party/externals/libjpeg/jerror.c', 78 '../third_party/externals/libjpeg/jerror.h', 79 '../third_party/externals/libjpeg/jfdctflt.c', 80 '../third_party/externals/libjpeg/jfdctfst.c', 81 '../third_party/externals/libjpeg/jfdctint.c', 82 '../third_party/externals/libjpeg/jidctflt.c', 83 '../third_party/externals/libjpeg/jidctfst.c', 84 '../third_party/externals/libjpeg/jidctint.c', 85 '../third_party/externals/libjpeg/jidctred.c', 86 '../third_party/externals/libjpeg/jinclude.h', 87 '../third_party/externals/libjpeg/jmemmgr.c', 88 '../third_party/externals/libjpeg/jmemnobs.c', 89 '../third_party/externals/libjpeg/jmemsys.h', 90 '../third_party/externals/libjpeg/jmorecfg.h', 91 '../third_party/externals/libjpeg/jpegint.h', 92 '../third_party/externals/libjpeg/jpeglib.h', 93 '../third_party/externals/libjpeg/jpeglibmangler.h', 94 '../third_party/externals/libjpeg/jquant1.c', 95 '../third_party/externals/libjpeg/jquant2.c', 96 '../third_party/externals/libjpeg/jutils.c', 97 '../third_party/externals/libjpeg/jversion.h', 98 ], 99 'direct_dependent_settings': { 100 'include_dirs': [ 101 '../third_party/externals/libjpeg', 102 ], 103 }, 104 'cflags': [ 105 '-w', # supresses warnings 106 ], 107 }, 108 ], 109 }, { ## use_system_libjpeg != 0 110 'targets': [ 111 { 112 'target_name': 'libjpeg', 113 'type': 'none', 114 'direct_dependent_settings': { 115 'defines': [ 116 'USE_SYSTEM_LIBJPEG', 117 ], 118 }, 119 'link_settings': { 120 'libraries': [ 121 '-ljpeg', 122 ], 123 }, 124 } 125 ], 126 }], 127 ], 128 }], 129 ], 130 } 131