aboutsummaryrefslogtreecommitdiffhomepage
path: root/gyp/libjpeg.gyp
blob: 975831bab773824460e96a4bd1f5d0e27f2e8c89 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
# Copyright 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

# This is a copy of ../third_party/externals/libjpeg/libjpeg.gyp , modified
# such that all source paths point into that directory.
# See http://code.google.com/p/skia/issues/detail?id=543 ('wrap libjpeg.gyp
# from Chrome's libjpeg port, rather than making our own copy') for a better
# long-term solution.

{
  'variables': {
    'use_system_libjpeg%': 0,
    'skia_warnings_as_errors': 0,
  },
  'conditions': [
    ['skia_os == "android"', {
      'targets': [
        {
          'target_name': 'libjpeg',
          'type': 'none',
          'dependencies': [
            'android_deps.gyp:jpeg',
          ],
          'export_dependent_settings': [
            'android_deps.gyp:jpeg',
          ],
        },
      ],
    }, { # skia_os != android
      'conditions': [
          ['use_system_libjpeg==0', {
          'targets': [
            {
              'target_name': 'libjpeg',
              'type': 'static_library',
              'sources': [
                # we currently build skia's version of libjpeg-turbo without
                # SIMD optimizations for simplicity
                '../third_party/externals/libjpeg/jsimd_none.c',

                '../third_party/externals/libjpeg/jcapimin.c',
                '../third_party/externals/libjpeg/jcapistd.c',
                '../third_party/externals/libjpeg/jccoefct.c',
                '../third_party/externals/libjpeg/jccolor.c',
                '../third_party/externals/libjpeg/jcdctmgr.c',
                '../third_party/externals/libjpeg/jchuff.c',
                '../third_party/externals/libjpeg/jchuff.h',
                '../third_party/externals/libjpeg/jcinit.c',
                '../third_party/externals/libjpeg/jcmainct.c',
                '../third_party/externals/libjpeg/jcmarker.c',
                '../third_party/externals/libjpeg/jcmaster.c',
                '../third_party/externals/libjpeg/jcomapi.c',
                '../third_party/externals/libjpeg/jconfig.h',
                '../third_party/externals/libjpeg/jcparam.c',
                '../third_party/externals/libjpeg/jcphuff.c',
                '../third_party/externals/libjpeg/jcprepct.c',
                '../third_party/externals/libjpeg/jcsample.c',
                '../third_party/externals/libjpeg/jdapimin.c',
                '../third_party/externals/libjpeg/jdapistd.c',
                '../third_party/externals/libjpeg/jdatadst.c',
                '../third_party/externals/libjpeg/jdatasrc.c',
                '../third_party/externals/libjpeg/jdcoefct.c',
                '../third_party/externals/libjpeg/jdcolor.c',
                '../third_party/externals/libjpeg/jdct.h',
                '../third_party/externals/libjpeg/jddctmgr.c',
                '../third_party/externals/libjpeg/jdhuff.c',
                '../third_party/externals/libjpeg/jdhuff.h',
                '../third_party/externals/libjpeg/jdinput.c',
                '../third_party/externals/libjpeg/jdmainct.c',
                '../third_party/externals/libjpeg/jdmarker.c',
                '../third_party/externals/libjpeg/jdmaster.c',
                '../third_party/externals/libjpeg/jdmerge.c',
                '../third_party/externals/libjpeg/jdphuff.c',
                '../third_party/externals/libjpeg/jdpostct.c',
                '../third_party/externals/libjpeg/jdsample.c',
                '../third_party/externals/libjpeg/jerror.c',
                '../third_party/externals/libjpeg/jerror.h',
                '../third_party/externals/libjpeg/jfdctflt.c',
                '../third_party/externals/libjpeg/jfdctfst.c',
                '../third_party/externals/libjpeg/jfdctint.c',
                '../third_party/externals/libjpeg/jidctflt.c',
                '../third_party/externals/libjpeg/jidctfst.c',
                '../third_party/externals/libjpeg/jidctint.c',
                '../third_party/externals/libjpeg/jidctred.c',
                '../third_party/externals/libjpeg/jinclude.h',
                '../third_party/externals/libjpeg/jmemmgr.c',
                '../third_party/externals/libjpeg/jmemnobs.c',
                '../third_party/externals/libjpeg/jmemsys.h',
                '../third_party/externals/libjpeg/jmorecfg.h',
                '../third_party/externals/libjpeg/jpegint.h',
                '../third_party/externals/libjpeg/jpeglib.h',
                '../third_party/externals/libjpeg/jpeglibmangler.h',
                '../third_party/externals/libjpeg/jquant1.c',
                '../third_party/externals/libjpeg/jquant2.c',
                '../third_party/externals/libjpeg/jutils.c',
                '../third_party/externals/libjpeg/jversion.h',
              ],
              'direct_dependent_settings': {
                'include_dirs': [
                  '../third_party/externals/libjpeg',
                ],
              },
              'conditions': [
                [ 'skia_os != "win"', {
                  'product_name': 'jpeg',
                  'cflags': [
                   '-Wno-main', # supresses warnings about naming things "main"
                  ],
                }],
              ],
            },
          ],
        }, {
          'targets': [
            {
              'target_name': 'libjpeg',
              'type': 'none',
              'direct_dependent_settings': {
                'defines': [
                  'USE_SYSTEM_LIBJPEG',
                ],
              },
              'link_settings': {
                'libraries': [
                  '-ljpeg',
                ],
              },
            }
          ],
        }],
      ],
    }],
  ],
}

# Local Variables:
# tab-width:2
# indent-tabs-mode:nil
# End:
# vim: set expandtab tabstop=2 shiftwidth=2: