blob: 35f699faaea386022c58dfa751c1fba32a3531e0 [file] [log] [blame]
commit-bot@chromium.org327c0812013-08-20 18:57:01 +00001# GYP for fontconfig (
2#
3# This has been tested on Windows and Mac.
4# This library is native to Linux, so build from source is not necessary.
5#
6# Additional files for building under Windows are provided here: (LGPL)
7# http://comments.gmane.org/gmane.comp.fonts.fontconfig/4438
8
9{
10 'variables': {
11 'skia_warnings_as_errors': 0,
12 },
13 'targets': [
14 {
15 'target_name': 'fontconfig',
16 'type': 'static_library',
17 'dependencies': [
18 'freetype.gyp:freetype_poppler',
19 ],
20 'include_dirs' : [
21 '../third_party/externals/fontconfig',
22
23 '../third_party/fontconfig/config',
24 '../third_party/fontconfig/config/src',
25 ],
26 'sources': [
27 '../third_party/externals/fontconfig/src/fcatomic.c',
28 '../third_party/externals/fontconfig/src/fcblanks.c',
29 '../third_party/externals/fontconfig/src/fccache.c',
30 '../third_party/externals/fontconfig/src/fccfg.c',
31 '../third_party/externals/fontconfig/src/fccharset.c',
32 '../third_party/externals/fontconfig/src/fccompat.c',
33 '../third_party/externals/fontconfig/src/fcdbg.c',
34 '../third_party/externals/fontconfig/src/fcdefault.c',
35 '../third_party/externals/fontconfig/src/fcdir.c',
36 '../third_party/externals/fontconfig/src/fcfreetype.c',
37 '../third_party/externals/fontconfig/src/fcfs.c',
38 '../third_party/externals/fontconfig/src/fchash.c',
39 '../third_party/externals/fontconfig/src/fcinit.c',
40 '../third_party/externals/fontconfig/src/fclang.c',
41 '../third_party/externals/fontconfig/src/fclist.c',
42 '../third_party/externals/fontconfig/src/fcmatch.c',
43 '../third_party/externals/fontconfig/src/fcmatrix.c',
44 '../third_party/externals/fontconfig/src/fcname.c',
45 '../third_party/externals/fontconfig/src/fcobjs.c',
46 '../third_party/externals/fontconfig/src/fcpat.c',
47 '../third_party/externals/fontconfig/src/fcserialize.c',
48 '../third_party/externals/fontconfig/src/fcstat.c',
49 '../third_party/externals/fontconfig/src/fcstr.c',
50 '../third_party/externals/fontconfig/src/fcxml.c',
51 '../third_party/externals/fontconfig/src/ftglue.c',
52 ],
53 'defines': [
54 'HAVE_CONFIG_H',
55 ],
56 'cflags': [
57 '-fPIC',
58 ],
59
60 'direct_dependent_settings': {
61 'include_dirs': [
62 '../third_party/externals/fontconfig',
63 ],
64 },
65
66 'conditions': [
67 ['skia_os == "mac"', {
68 'include_dirs': [
69 '../third_party/fontconfig/config/mac',
70 '../third_party/fontconfig/config/mac/src',
71 ],
72 'defines': [
73 'FC_CACHEDIR',
74 'FONTCONFIG_PATH',
75 ],
76 'libraries': [
77 '$(SDKROOT)/usr/lib/libexpat.dylib',
78 ],
79 'xcode_settings': {
80 'DYLIB_INSTALL_NAME_BASE': '@executable_path',
81 },
82 }],
83 ['skia_os == "win"', {
84 'include_dirs': [
85 '../third_party/fontconfig/config/windows',
86 '../third_party/fontconfig/config/windows/src',
87 ],
88 'sources!': [
89 '../third_party/externals/fontconfig/src/fccompat.c',
90 '../third_party/externals/fontconfig/src/fcxml.c',
91 ],
92 'defines': [
93 # inline is not recognized in C and has to be __inline
94 'inline=__inline',
95 ],
96 }],
97 ],
98 },
99 ],
100}