Skip to content

Instantly share code, notes, and snippets.

@LaurentGomila
Created February 18, 2013 21:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save LaurentGomila/cadba9512eb4b5140acd to your computer and use it in GitHub Desktop.
Save LaurentGomila/cadba9512eb4b5140acd to your computer and use it in GitHub Desktop.
Quick and dirty CMake file for FreeType 2.4.4 (used on Windows - probably not portable)
set(CMAKE_C_OUTPUT_EXTENSION .o)
cmake_minimum_required(VERSION 2.8)
# set a default build type if none was provided
# this has to be done before the project() instruction!
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build (Debug or Release)" FORCE)
endif()
# project name
project(freetype)
# add an option for choosing the build type (shared or static)
set(BUILD_SHARED_LIBS TRUE CACHE BOOL "TRUE to build jpeg as shared libraries, FALSE to build it as static libraries")
# source files
set(SRC
builds/win32/ftdebug.c
src/autofit/autofit.c
src/bdf/bdf.c
src/cff/cff.c
src/base/ftbase.c
src/base/ftbitmap.c
src/cache/ftcache.c
src/base/ftfstype.c
src/base/ftgasp.c
src/base/ftglyph.c
src/gzip/ftgzip.c
src/base/ftinit.c
src/lzw/ftlzw.c
src/base/ftstroke.c
src/base/ftsystem.c
src/smooth/smooth.c
src/base/ftbbox.c
src/base/ftgxval.c
src/base/ftlcdfil.c
src/base/ftmm.c
src/base/ftotval.c
src/base/ftpatent.c
src/base/ftpfr.c
src/base/ftsynth.c
src/base/fttype1.c
src/base/ftwinfnt.c
src/base/ftxf86.c
src/pcf/pcf.c
src/pfr/pfr.c
src/psaux/psaux.c
src/pshinter/pshinter.c
src/psnames/psmodule.c
src/raster/raster.c
src/sfnt/sfnt.c
src/truetype/truetype.c
src/type1/type1.c
src/cid/type1cid.c
src/type42/type42.c
src/winfonts/winfnt.c
include/ft2build.h
include/freetype/config/ftconfig.h
include/freetype/config/ftheader.h
include/freetype/config/ftmodule.h
include/freetype/config/ftoption.h
include/freetype/config/ftstdlib.h
)
add_definitions(-DFT2_BUILD_LIBRARY)
# add the include directory to the compiler search paths
include_directories(include)
# define the target
add_library(freetype ${SRC})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment