blob: 975831bab773824460e96a4bd1f5d0e27f2e8c89 [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 },
104 'conditions': [
borenet@google.coma72aef82013-03-22 13:16:06 +0000105 [ 'skia_os != "win"', {
djsollen@google.com11399402013-03-20 17:45:27 +0000106 'product_name': 'jpeg',
107 'cflags': [
108 '-Wno-main', # supresses warnings about naming things "main"
109 ],
110 }],
djsollen@google.com11399402013-03-20 17:45:27 +0000111 ],
112 },
113 ],
114 }, {
115 'targets': [
116 {
117 'target_name': 'libjpeg',
118 'type': 'none',
119 'direct_dependent_settings': {
120 'defines': [
121 'USE_SYSTEM_LIBJPEG',
122 ],
123 },
124 'link_settings': {
125 'libraries': [
126 '-ljpeg',
127 ],
128 },
129 }
130 ],
131 }],
epoger@google.com9fee7ad2012-03-26 18:29:26 +0000132 ],
133 }],
epoger@google.comce47fec2012-03-16 19:01:38 +0000134 ],
135}
136
137# Local Variables:
138# tab-width:2
139# indent-tabs-mode:nil
140# End:
141# vim: set expandtab tabstop=2 shiftwidth=2: