====== Freetype PHP Windows, How to compile ======
Project homepage: [[http:://freetype.org]]
===== Available prebuilt libraries =====
All prebuilt libraries are available in the php-libs [[http://windows.php.net/downloads/php-sdk/deps/|repositories]]
For PHP suitable sources and up-to-date information see [[https://github.com/winlibs/freetype]]
The filename format is:
freetype-x.y.z-vcversion.zip
where x.y.z defines the version, vcversion which Visual C++ has been used.
Only the static libraries are built for now. We may add DLLs later but PHP is linked statically against Freetype.
==== Naming ====
The libraries are named as follow:
freetype{buildtype}{_debug}.lib
{buildtype} can be either MT, ST or empty. MT stands for Multithreaded, ST for Singlethreaded and empty is the default mode (non MT). As in all other libraries, we add the "_debug" postfix for the debug builds.
===== Building Freetype =====
==== Requirements ====
* Freetype sources [[https://github.com/winlibs/|Src repositories]]
* Common tools to compile PHP
==== Configurations ====
Edit the file "Jamfile" in the root of the Freetype source directory. Change the line 57 from:
# Name of final library, without extension.
#
FT2_LIB ?= $(LIBPREFIX)freetype ;
to
# Name of final library, without extension.
#
FT2_LIB ?= $(LIBPREFIX)freetype_a ;
Tell Jam to use Visual C++:
cd C:\php-sdk\2k5\x86\libs_buildlibs\freetype-2.3.7
set JAM_TOOLSET=VISUALC
==== Compilation ====
Open a Platform SDK development console (vc6), or the Visual Studio command line (vc7/8/9) and run:
jam
The objs directory will contain the static library.
The include directory contains all headers that have to be distributed/installed.