File: libexif.gyp

package info (click to toggle)
qtwebengine-opensource-src 5.7.1%2Bdfsg-6.1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 1,028,096 kB
  • ctags: 1,436,736
  • sloc: cpp: 5,960,176; ansic: 3,477,727; asm: 395,492; python: 320,633; sh: 96,504; perl: 69,449; xml: 42,977; makefile: 28,408; objc: 9,962; yacc: 9,847; tcl: 5,430; lex: 2,259; ruby: 1,053; lisp: 522; awk: 497; pascal: 310; cs: 249; sed: 53
file content (133 lines) | stat: -rw-r--r-- 4,577 bytes parent folder | download
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
# Copyright (c) 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.

{
  'variables': {
    'conditions': [
      ['OS == "linux" and chromeos==0', {
        'use_system_libexif%': 1,
      }, {  # OS != "linux" and chromeos==0
        'use_system_libexif%': 0,
      }],
    ],
  },
  'conditions': [
    ['use_system_libexif==0', {
      'targets': [
        {
          'target_name': 'libexif',
          'type': 'loadable_module',
          'sources': [
            'sources/libexif/exif-byte-order.c',
            'sources/libexif/exif-content.c',
            'sources/libexif/exif-data.c',
            'sources/libexif/exif-entry.c',
            'sources/libexif/exif-format.c',
            'sources/libexif/exif-ifd.c',
            'sources/libexif/exif-loader.c',
            'sources/libexif/exif-log.c',
            'sources/libexif/exif-mem.c',
            'sources/libexif/exif-mnote-data.c',
            'sources/libexif/exif-tag.c',
            'sources/libexif/exif-utils.c',
            'sources/libexif/canon/exif-mnote-data-canon.c',
            'sources/libexif/canon/mnote-canon-entry.c',
            'sources/libexif/canon/mnote-canon-tag.c',
            'sources/libexif/fuji/exif-mnote-data-fuji.c',
            'sources/libexif/fuji/mnote-fuji-entry.c',
            'sources/libexif/fuji/mnote-fuji-tag.c',
            'sources/libexif/olympus/exif-mnote-data-olympus.c',
            'sources/libexif/olympus/mnote-olympus-entry.c',
            'sources/libexif/olympus/mnote-olympus-tag.c',
            'sources/libexif/pentax/exif-mnote-data-pentax.c',
            'sources/libexif/pentax/mnote-pentax-entry.c',
            'sources/libexif/pentax/mnote-pentax-tag.c',
          ],
          'include_dirs': [
            'sources',
          ],
          'direct_dependent_settings': {
            'include_dirs': [
              'sources',
            ],
          },
          'variables': {
            'clang_warning_flags': [
              '-Wno-enum-conversion',
              '-Wno-switch',
              '-Wno-format',
              # libexif uses fabs(int) to cast to float.
              '-Wno-absolute-value',
            ],
          },
          'conditions': [
            ['os_posix==1 and OS!="mac"', {
              'cflags!': ['-fvisibility=hidden'],
              'libraries': ['-lm'],
            }],
            ['OS=="mac"', {
              'conditions': [
               ['mac_breakpad==1', {
                  'variables': {
                    'mac_real_dsym': 1,
                  },
               }],
              ],
              'xcode_settings': {
                'GCC_SYMBOLS_PRIVATE_EXTERN': 'NO', # no -fvisibility=hidden
              },
            }],
            ['OS=="win"', {
              'product_name': 'libexif',
              'sources': [
                'libexif.def',
              ],
              'conditions': [
                ['MSVS_VERSION < "2015"', {
                  'defines': [
                    # This seems like a hack, but this is what Safari Win does.
                    # Luckily it is no longer needed/allowed with VS 2015.
                    'snprintf=_snprintf',
                  ],
                }],
              ],
              'defines': [
                'inline=__inline',
              ],
              'msvs_disabled_warnings': [
                4018, # size/unsigned mismatch
                4267, # size_t -> ExifLong truncation on amd64
              ],
              # As of VS 2013 Update 3, building this project with /analyze hits
              # an internal compiler error on exif-entry.c. This halts the build
              # and prevents subsequent analysis. Therefore, /analyze is
              # disabled for this project. See this bug for details:
              # https://connect.microsoft.com/VisualStudio/feedback/details/1014689/internal-compiler-error
              'msvs_settings': {
                'VCCLCompilerTool': {
                  'AdditionalOptions!': [ '/analyze:WX-' ]
                },
              },
            }],
          ],
        },
      ],
    }, { # 'use_system_libexif!=0
      'targets': [
        {
          'target_name': 'libexif',
          'type': 'none',
          'direct_dependent_settings': {
            'cflags': [
                '<!@(<(pkg-config) --cflags libexif)',
            ],
            'defines': [
              'USE_SYSTEM_LIBEXIF',
            ],
          },
        }
      ],
    }],
  ]
}