forked from ProteoWizard/pwiz
-
Notifications
You must be signed in to change notification settings - Fork 0
/
freetype.jam
101 lines (90 loc) · 3.22 KB
/
freetype.jam
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
#
# $Id$
#
#~ Copyright Rene Rivera 2007.
#~ Distributed under the Boost Software License, Version 1.0.
#~ (See accompanying file LICENSE_1_0.txt or copy at
#~ http://www.boost.org/LICENSE_1_0.txt)
###
import extension ;
import tar ;
extension.declare freetype ;
rule init ( version ? : location : options * )
{
if ! $(.initialized)
{
.initialized = true ;
if [ path.exists $(location).tar.bz2 ]
{
tar.extract $(location).tar.bz2 : *.c *.h : : : <check-last-file-only>true ;
}
else if ! [ path.exists $(location) ]
{
import errors ;
errors.user-error "Freetype source tree not found at $(location)" ;
}
version ?= default ;
local requirements =
[ extension.define freetype $(version) : $(location) : $(options) ]
<freetype-version>$(version)
<freetype-location>$(location)
<toolset>msvc:<define>_CRT_SECURE_NO_DEPRECATE
<toolset>msvc:<define>_SCL_SECURE_NO_WARNINGS
[ extension.static-with-fpic ]
;
local common-requirements =
<include>$(location)/include
;
local rule src ( subdir names + )
{
return $(location)/src/$(subdir)/$(names:S=.c) ;
}
extension.text freetype $(version)
: ftdefs.h
: "#define FT_EXPORT(x) FT_DLLEXPORT extern x"
;
common-requirements +=
<implicit-dependency>/ext/freetype//ftdefs.h
<dependency>/ext/freetype//ftdefs.h
<toolset>msvc:<cflags>-FIftdefs.h
<toolset>msvc,<link>static:<define>FT_DLLEXPORT=
;
lib freetype
: [ src autofit autofit ]
[ src base ftbase ]
[ src base
ftsystem ftinit ftglyph ftmm ftbdf ftbbox ftdebug
ftxf86 fttype1 ftpfr ftstroke ftwinfnt ftotval ftbitmap
ftsynth ftgxval ftlcdfil ftgasp ftpatent ]
[ src bdf bdf ]
[ src cache ftcache ]
[ src cff cff ]
[ src cid type1cid ]
[ src gzip ftgzip ]
[ src lzw ftlzw ]
[ src pcf pcf ]
[ src pfr pfr ]
[ src psaux psaux ]
[ src pshinter pshinter ]
[ src psnames psnames ]
[ src raster raster ]
[ src sfnt sfnt ]
[ src smooth smooth ]
[ src truetype truetype ]
[ src type1 type1 ]
[ src type42 type42 ]
[ src winfonts winfnt ]
: $(requirements) $(common-requirements)
<location-prefix>freetype
<define>FT2_BUILD_LIBRARY
<toolset>msvc,<link>shared:<define>FT_DLLEXPORT=__declspec(dllexport)
<toolset>msvc:<define>_CRT_SECURE_NO_DEPRECATE
<toolset>msvc:<define>_SCL_SECURE_NO_DEPRECATE
<warnings>off
:
: $(common-requirements)
<define>FT_FREETYPE_H
<toolset>msvc,<link>shared:<define>FT_DLLEXPORT=__declspec(dllimport)
;
}
}