Merge branch 'upstream' into tizen
[platform/upstream/harfbuzz.git] / BUILD.md
1 On Linux, install the development packages for FreeType, Cairo, and GLib. For
2 example, on Ubuntu / Debian, you would do:
3
4     $ sudo apt-get install meson pkg-config ragel gtk-doc-tools gcc g++ libfreetype6-dev libglib2.0-dev libcairo2-dev
5
6 whereas on Fedora, RHEL, CentOS, and other Red Hat based systems you would do:
7
8     $ sudo dnf install meson pkgconfig gtk-doc gcc gcc-c++ freetype-devel glib2-devel cairo-devel
9
10 and on ArchLinux and Manjaro:
11
12     $ sudo pacman -Suy meson pkg-config ragel gcc freetype2 glib2 cairo
13
14 On macOS:
15
16     brew install pkg-config ragel gtk-doc freetype glib cairo meson
17
18 Then use meson to build the project like:
19
20     meson build && meson test -Cbuild
21
22 On Windows, meson can build the project like above if a working MSVC's cl.exe
23 (`vcvarsall.bat`) or gcc/clang is already on your path, and if you use
24 something like `meson build --wrap-mode=default` it fetches and compiles most
25 of the dependencies also.  It is recommended to install CMake either manually
26 or via the Visual Studio installer when building with MSVC, using meson.
27
28 Our CI configurations are also a good source of learning how to build HarfBuzz.
29
30 There is also amalgamated source provided with HarfBuzz which reduces whole process
31 of building HarfBuzz to `g++ src/harfbuzz.cc -fno-exceptions` but there is
32 no guarantee provided with buildability and reliability of features you get.