blob: 73072948854ee6ae4d797599d1553d52ccd78c1b [file] [log] [blame]
epoger@google.com9fee7ad2012-03-26 18:29:26 +00001# Copyright 2012 The Chromium Authors. All rights reserved.
epoger@google.comce47fec2012-03-16 19:01:38 +00002# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
epoger@google.com9fee7ad2012-03-26 18:29:26 +00005# 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.
epoger@google.comce47fec2012-03-16 19:01:38 +000010
11{
epoger@google.com9fee7ad2012-03-26 18:29:26 +000012 'variables': {
epoger@google.com4db4adc2012-03-26 20:04:54 +000013 'use_system_libjpeg%': 0,
borenet@google.coma72aef82013-03-22 13:16:06 +000014 'skia_warnings_as_errors': 0,
epoger@google.com9fee7ad2012-03-26 18:29:26 +000015 },
16 'conditions': [
djsollen@google.com11399402013-03-20 17:45:27 +000017 ['skia_os == "android"', {
epoger@google.com9fee7ad2012-03-26 18:29:26 +000018 'targets': [
19 {
20 'target_name': 'libjpeg',
21 'type': 'none',
djsollen@google.com11399402013-03-20 17:45:27 +000022 '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': [
djsollen@google.com42416ee2013-06-10 15:19:33 +000038 # we currently build skia's version of libjpeg-turbo without
39 # SIMD optimizations for simplicity
40 '../third_party/externals/libjpeg/jsimd_none.c',
skia.committer@gmail.com7fb53732013-06-11 07:01:17 +000041
djsollen@google.com11399402013-03-20 17:45:27 +000042 '../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',
djsollen@google.com42416ee2013-06-10 15:19:33 +000085 '../third_party/externals/libjpeg/jidctred.c',
djsollen@google.com11399402013-03-20 17:45:27 +000086 '../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',
djsollen@google.com42416ee2013-06-10 15:19:33 +000093 '../third_party/externals/libjpeg/jpeglibmangler.h',
djsollen@google.com11399402013-03-20 17:45:27 +000094 '../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 },
commit-bot@chromium.org4324c3b2014-02-21 20:11:42 +0000104 'cflags': [
105 '-w', # supresses warnings
djsollen@google.com11399402013-03-20 17:45:27 +0000106 ],
107 },
108 ],
commit-bot@chromium.orgf84722e2014-02-24 20:22:34 +0000109 }, { ## use_system_libjpeg != 0
djsollen@google.com11399402013-03-20 17:45:27 +0000110 '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 }],
epoger@google.com9fee7ad2012-03-26 18:29:26 +0000127 ],
128 }],
epoger@google.comce47fec2012-03-16 19:01:38 +0000129 ],
130}