|
1
|
+# Building FreeType
|
1
|
2
|
|
2
|
3
|
There are several ways to build the FreeType library, depending on
|
3
|
4
|
your system and the level of customization you need. Here is a short
|
4
|
5
|
overview of the documentation available:
|
5
|
6
|
|
6
|
7
|
|
7
|
|
-I. Prerequisites and dependencies
|
8
|
|
-=================================
|
|
8
|
+## A. Prerequisites and dependencies
|
9
|
9
|
|
10
|
10
|
FreeType is a low level C library that only depends on the standard
|
11
|
11
|
C library with very few platform-dependent optimizations utilized at
|
... |
... |
@@ -24,15 +24,14 @@ I. Prerequisites and dependencies |
24
|
24
|
run-time; look at the documentation of function `FT_Property_Set`.
|
25
|
25
|
|
26
|
26
|
|
27
|
|
-II. Normal installation and upgrades
|
28
|
|
-====================================
|
|
27
|
+## B. Normal installation and upgrades
|
29
|
28
|
|
30
|
|
- 1. Unix and Unix-like systems
|
|
29
|
+1. Unix and Unix-like systems
|
31
|
30
|
|
32
|
31
|
This also includes MacOS, Cygwin, MinGW + MSYS, Mingw-w64 + MSYS2,
|
33
|
32
|
and possibly other, similar environments.
|
34
|
33
|
|
35
|
|
- Please read `INSTALL.UNIX` to install or upgrade FreeType 2 on a
|
|
34
|
+ Please read [INSTALL.UNIX] to install or upgrade FreeType 2 on a
|
36
|
35
|
Unix system. Note that you *need* GNU Make for automatic
|
37
|
36
|
compilation, since other make tools won't work (this includes BSD
|
38
|
37
|
Make).
|
... |
... |
@@ -40,7 +39,7 @@ II. Normal installation and upgrades |
40
|
39
|
GNU Make VERSION 3.81 OR NEWER IS NEEDED!
|
41
|
40
|
|
42
|
41
|
|
43
|
|
- 2. Other systems using GNU Make
|
|
42
|
+2. Other systems using GNU Make
|
44
|
43
|
|
45
|
44
|
On some non-Unix platforms, it is possible to build the library
|
46
|
45
|
using only the GNU Make utility. Note that *NO OTHER MAKE TOOL
|
... |
... |
@@ -48,22 +47,24 @@ II. Normal installation and upgrades |
48
|
47
|
Windows, OS/2, and BeOS, including MinGW* (without MSYS*), Visual
|
49
|
48
|
C++, Borland C++, and more.
|
50
|
49
|
|
51
|
|
- Instructions are provided in the file `INSTALL.GNU`.
|
|
50
|
+ Instructions are provided in the file [INSTALL.GNU].
|
52
|
51
|
|
53
|
52
|
|
54
|
|
- 3. Other build tools and platforms.
|
|
53
|
+3. Other build tools and platforms.
|
55
|
54
|
|
56
|
55
|
A few other tools can be used to build FreeType. You can find
|
57
|
56
|
the corresponding instruction files in the FreeType root folder
|
58
|
57
|
or the builds/ sub-folder.
|
59
|
58
|
|
60
|
|
- CMake :: see `CMakeLists.txt` for more information
|
61
|
|
- Meson :: see `meson.build` for more information
|
62
|
|
- MSBuild :: see `builds/windows/vc2010/freetype.vcxproj`
|
63
|
|
- MMS :: see `vms_make.com` and `docs/INSTALL.VMS`
|
|
59
|
+ |Build Tool | Details |
|
|
60
|
+ | --- | --- |
|
|
61
|
+ |CMake | see [CMakeLists.txt] for more information |
|
|
62
|
+ |Meson | see [meson.build] for more information |
|
|
63
|
+ |MSBuild | see [freetype.vcxproj] |
|
|
64
|
+ |MMS | see [vms_make.com] and [INSTALL.VMS] |
|
64
|
65
|
|
65
|
66
|
|
66
|
|
- 4. With an IDE Project File (e.g., for Visual Studio or CodeWarrior)
|
|
67
|
+4. With an IDE Project File (e.g., for Visual Studio or CodeWarrior)
|
67
|
68
|
|
68
|
69
|
We provide a small number of 'project files' for various IDEs to
|
69
|
70
|
automatically build the library as well. Note that these files
|
... |
... |
@@ -74,22 +75,63 @@ II. Normal installation and upgrades |
74
|
75
|
directory, where <system> stands for your OS or environment.
|
75
|
76
|
|
76
|
77
|
|
77
|
|
- 5. From you own IDE, or own Makefiles
|
|
78
|
+5. From you own IDE, or own Makefiles
|
78
|
79
|
|
79
|
80
|
If you want to create your own project file, follow the
|
80
|
|
- instructions given in the `INSTALL.ANY` document of this
|
|
81
|
+ instructions given in the [INSTALL.ANY] document of this
|
81
|
82
|
directory.
|
82
|
83
|
|
83
|
84
|
|
84
|
|
-III. Custom builds of the library
|
85
|
|
-=================================
|
|
85
|
+## C. Custom builds of the library
|
86
|
86
|
|
87
|
87
|
Customizing the compilation of FreeType is easy, and allows you to
|
88
|
88
|
select only the components of the font engine that you really need.
|
89
|
|
- For more details read the file `CUSTOMIZE`.
|
|
89
|
+ For more details read the file [docs/CUSTOMIZE][CUSTOMIZE].
|
90
|
90
|
|
|
91
|
+## D. Standard builds with `configure`
|
91
|
92
|
|
92
|
|
-----------------------------------------------------------------------
|
|
93
|
+ The git repository doesn't contain pre-built configuration scripts for
|
|
94
|
+ UNIXish platforms. To generate them say
|
|
95
|
+
|
|
96
|
+ sh autogen.sh
|
|
97
|
+
|
|
98
|
+ which in turn depends on the following packages:
|
|
99
|
+
|
|
100
|
+ automake (1.10.1)
|
|
101
|
+ libtool (2.2.4)
|
|
102
|
+ autoconf (2.62)
|
|
103
|
+
|
|
104
|
+ The versions given in parentheses are known to work. Newer versions
|
|
105
|
+ should work too, of course. Note that `autogen.sh` also sets up
|
|
106
|
+ proper file permissions for the `configure` and auxiliary scripts.
|
|
107
|
+
|
|
108
|
+ The `autogen.sh` script checks whether the versions of the above three
|
|
109
|
+ tools match the numbers above. Otherwise it will complain and suggest
|
|
110
|
+ either upgrading or using environment variables to point to more
|
|
111
|
+ recent versions of the required tools.
|
|
112
|
+
|
|
113
|
+ Note that `aclocal` is provided by the 'automake' package on Linux,
|
|
114
|
+ and that `libtoolize` is called `glibtoolize` on Darwin (OS X).
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+## E. Alternative build methods
|
|
118
|
+
|
|
119
|
+ For static builds that don't use platform-specific optimizations, no
|
|
120
|
+ configure script is necessary at all; saying
|
|
121
|
+
|
|
122
|
+ make setup ansi
|
|
123
|
+ make
|
|
124
|
+
|
|
125
|
+ should work on all platforms that have GNU `make` (or `makepp`).
|
|
126
|
+
|
|
127
|
+ A build with `cmake` or `meson` can be done directly from the git
|
|
128
|
+ repository. However, if you want to use the `FT_DEBUG_LOGGING` macro
|
|
129
|
+ (see file [docs/DEBUG][DEBUG] for more information) it is currently mandatory
|
|
130
|
+ to execute `autogen.sh` in advance; this script clones the 'dlg' git
|
|
131
|
+ submodule and copies some files into FreeType's source tree.
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+---
|
93
|
135
|
|
94
|
136
|
[1] make++, a make tool written in Perl, has sufficient support of GNU
|
95
|
137
|
make extensions to build FreeType. See
|
... |
... |
@@ -99,7 +141,7 @@ III. Custom builds of the library |
99
|
141
|
for more information; you need version 2.0 or newer, and you must
|
100
|
142
|
pass option `--norc-substitution`.
|
101
|
143
|
|
102
|
|
-----------------------------------------------------------------------
|
|
144
|
+---
|
103
|
145
|
|
104
|
146
|
Copyright (C) 2000-2023 by
|
105
|
147
|
David Turner, Robert Wilhelm, and Werner Lemberg.
|
... |
... |
@@ -110,5 +152,15 @@ license, LICENSE.TXT. By continuing to use, modify, or distribute |
110
|
152
|
this file you indicate that you have read the license and understand
|
111
|
153
|
and accept it fully.
|
112
|
154
|
|
113
|
|
-
|
114
|
|
---- end of INSTALL --- |
|
155
|
+<!----------------------------------------------------------------------------->
|
|
156
|
+
|
|
157
|
+[CMakeLists.txt]: ../CMakeLists.txt
|
|
158
|
+[meson.build]: ../meson.build
|
|
159
|
+[freetype.vcxproj]: ../builds/windows/vc2010/freetype.vcxproj
|
|
160
|
+[vms_make.com]: ../vms_make.com
|
|
161
|
+[INSTALL.VMS]: ./INSTALL.VMS
|
|
162
|
+[INSTALL.ANY]: ./INSTALL.ANY
|
|
163
|
+[INSTALL.GNU]: ./INSTALL.GNU
|
|
164
|
+[INSTALL.UNIX]: ./INSTALL.UNIX
|
|
165
|
+[CUSTOMIZE]: ./CUSTOMIZE
|
|
166
|
+[DEBUG]: ./DEBUG |