Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / third_party / skia / gyp / freetype.gyp
1 # Target for building freetype.
2 {
3   'targets': [
4     {
5       'target_name': 'freetype',
6       'type': 'none',
7       'conditions': [
8         [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "chromeos"]', {
9           'direct_dependent_settings': {
10             'include_dirs' : [
11               '/usr/include/freetype2',
12             ],
13             'link_settings': {
14               'libraries': [
15                 '-lfreetype',
16               ],
17               'defines': [
18                 #The font host requires at least FreeType 2.3.0 at runtime.
19                 'SK_FONTHOST_FREETYPE_RUNTIME_VERSION=0x020300',\
20                 'SK_CAN_USE_DLOPEN=1',
21               ],
22             }
23           },
24         }],
25         [ 'skia_os in ["android", "nacl"]', {
26           'dependencies': [
27             'freetype_static'
28           ],
29           'export_dependent_settings': [
30             'freetype_static'
31           ],
32           'direct_dependent_settings': {
33             'defines': [
34               # Both Android and NaCl provide at least FreeType 2.4.0
35               'SK_FONTHOST_FREETYPE_RUNTIME_VERSION=0x020400',
36               'SK_CAN_USE_DLOPEN=0',
37             ],
38           },
39         }],
40         [ 'skia_android_framework', {
41             'include_dirs': [
42               'external/expat/lib',
43               'external/freetype/include',
44             ],
45             'libraries': [
46               '-lft2',
47             ],
48             # Remove these, and use the system's freetype instead.
49             'dependencies!': [
50               'freetype_static',
51             ],
52             'export_dependent_settings!': [
53               'freetype_static',
54             ]
55         }],
56       ],
57     },
58     {
59       'target_name': 'freetype_static',
60       'type': 'static_library',
61       'standalone_static_library': 1,
62       'dependencies': [
63         # we are dependent upon PNG for color emoji glyphs
64         'images.gyp:images'
65       ],
66       'includes': [
67         # common freetype sources needed for both the base Skia build and the
68         # libpoppler build for testing only
69         'freetype.gypi',
70       ],
71       'include_dirs': [
72         '../third_party/freetype/include_overrides',
73       ],
74       'direct_dependent_settings': {
75         'include_dirs': [
76           '../third_party/freetype/include_overrides',
77         ],
78       },
79       'conditions': [
80         [ 'skia_os == "android"', {
81           # These flags are used by the Android OS.  They are probably overkill
82           # for Skia, but we add them for consistency.
83           'cflags': [
84             '-W',
85             '-Wall',
86             '-fPIC',
87             '-DPIC',
88             '-DDARWIN_NO_CARBON',
89             '-DFT2_BUILD_LIBRARY',
90             '-O2',
91           ],
92         }],
93       ],
94     },
95     {
96       'target_name': 'freetype_poppler',
97       'type': 'static_library',
98       'standalone_static_library': 1,
99       'includes': [
100         'freetype.gypi',
101       ],
102       'sources': [
103         # additional components used by poppler
104         '../third_party/externals/freetype/src/base/ftbdf.c',
105         '../third_party/externals/freetype/src/base/ftpfr.c',
106
107         '../third_party/externals/freetype/src/bdf/bdf.c',
108         '../third_party/externals/freetype/src/cid/type1cid.c',
109         '../third_party/externals/freetype/src/pcf/pcf.c',
110         '../third_party/externals/freetype/src/pfr/pfr.c',
111         '../third_party/externals/freetype/src/psaux/psaux.c',
112         '../third_party/externals/freetype/src/type1/type1.c',
113         '../third_party/externals/freetype/src/type42/type42.c',
114         '../third_party/externals/freetype/src/winfonts/winfnt.c',
115
116         '../third_party/externals/freetype/src/gzip/ftgzip.c',
117         '../third_party/externals/freetype/src/lzw/ftlzw.c',
118       ],
119     },
120   ],
121 }