aboutsummaryrefslogtreecommitdiffhomepage
path: root/gyp/fontconfig.gyp
blob: 35f699faaea386022c58dfa751c1fba32a3531e0 (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
# GYP for fontconfig (
#
# This has been tested on Windows and Mac.
# This library is native to Linux, so build from source is not necessary.
#
# Additional files for building under Windows are provided here: (LGPL)
# http://comments.gmane.org/gmane.comp.fonts.fontconfig/4438

{
  'variables': {
    'skia_warnings_as_errors': 0,
  },
  'targets': [
    {
      'target_name': 'fontconfig',
      'type': 'static_library',
      'dependencies': [
        'freetype.gyp:freetype_poppler',
      ],
      'include_dirs' : [
        '../third_party/externals/fontconfig',

        '../third_party/fontconfig/config',
        '../third_party/fontconfig/config/src',
      ],
      'sources': [
        '../third_party/externals/fontconfig/src/fcatomic.c',
        '../third_party/externals/fontconfig/src/fcblanks.c',
        '../third_party/externals/fontconfig/src/fccache.c',
        '../third_party/externals/fontconfig/src/fccfg.c',
        '../third_party/externals/fontconfig/src/fccharset.c',
        '../third_party/externals/fontconfig/src/fccompat.c',
        '../third_party/externals/fontconfig/src/fcdbg.c',
        '../third_party/externals/fontconfig/src/fcdefault.c',
        '../third_party/externals/fontconfig/src/fcdir.c',
        '../third_party/externals/fontconfig/src/fcfreetype.c',
        '../third_party/externals/fontconfig/src/fcfs.c',
        '../third_party/externals/fontconfig/src/fchash.c',
        '../third_party/externals/fontconfig/src/fcinit.c',
        '../third_party/externals/fontconfig/src/fclang.c',
        '../third_party/externals/fontconfig/src/fclist.c',
        '../third_party/externals/fontconfig/src/fcmatch.c',
        '../third_party/externals/fontconfig/src/fcmatrix.c',
        '../third_party/externals/fontconfig/src/fcname.c',
        '../third_party/externals/fontconfig/src/fcobjs.c',
        '../third_party/externals/fontconfig/src/fcpat.c',
        '../third_party/externals/fontconfig/src/fcserialize.c',
        '../third_party/externals/fontconfig/src/fcstat.c',
        '../third_party/externals/fontconfig/src/fcstr.c',
        '../third_party/externals/fontconfig/src/fcxml.c',
        '../third_party/externals/fontconfig/src/ftglue.c',
      ],
      'defines': [
        'HAVE_CONFIG_H',
      ],
      'cflags': [
        '-fPIC',
      ],

      'direct_dependent_settings': {
        'include_dirs': [
          '../third_party/externals/fontconfig',
        ],
      },

      'conditions': [
        ['skia_os == "mac"', {
          'include_dirs': [
            '../third_party/fontconfig/config/mac',
            '../third_party/fontconfig/config/mac/src',
          ],
          'defines': [
            'FC_CACHEDIR',
            'FONTCONFIG_PATH',
          ],
          'libraries': [
            '$(SDKROOT)/usr/lib/libexpat.dylib',
          ],
          'xcode_settings': {
            'DYLIB_INSTALL_NAME_BASE': '@executable_path',
          },
        }],
        ['skia_os == "win"', {
          'include_dirs': [
            '../third_party/fontconfig/config/windows',
            '../third_party/fontconfig/config/windows/src',
          ],
          'sources!': [
            '../third_party/externals/fontconfig/src/fccompat.c',
            '../third_party/externals/fontconfig/src/fcxml.c',
          ],
          'defines': [
            # inline is not recognized  in C and has to be __inline
            'inline=__inline',
          ],
        }],
      ],
    },
  ],
}