2013-10-24 08:49:08 +02:00
|
|
|
# CMakeLists.txt
|
|
|
|
#
|
* Version 2.5.3 released.
=========================
Tag sources with `VER-2-5-3'.
* docs/VERSION.DLL: Update documentation and bump version number to
2.5.3.
* README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
builds/windows/vc2005/index.html,
builds/windows/vc2008/freetype.vcproj,
builds/windows/vc2008/index.html,
builds/windows/vc2010/freetype.vcxproj,
builds/windows/vc2010/index.html,
builds/windows/visualc/freetype.dsp,
builds/windows/visualc/freetype.vcproj,
builds/windows/visualc/index.html,
builds/windows/visualce/freetype.dsp,
builds/windows/visualce/freetype.vcproj,
builds/windows/visualce/index.html,
builds/wince/vc2005-ce/freetype.vcproj,
builds/wince/vc2005-ce/index.html,
builds/wince/vc2008-ce/freetype.vcproj,
builds/wince/vc2008-ce/index.html: s/2.5.2/2.5.3/, s/252/253/.
* include/freetype/freetype.h (FREETYPE_PATCH): Set to 3.
* builds/unix/configure.raw (version_info): Set to 17:2:11.
* CMakeLists.txt (VERSION_PATCH): Set to 3.
* docs/CHANGES: Updated.
2014-03-06 19:13:45 +01:00
|
|
|
# Copyright 2013, 2014 by
|
2013-10-24 08:49:08 +02:00
|
|
|
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
|
|
|
#
|
|
|
|
# Written by John Cary <cary@txcorp.com>
|
|
|
|
#
|
|
|
|
# This file is part of the FreeType project, and may only be used, modified,
|
|
|
|
# and distributed under the terms of the FreeType project license,
|
|
|
|
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
|
|
|
# indicate that you have read the license and understand and accept it
|
|
|
|
# fully.
|
|
|
|
#
|
|
|
|
#
|
|
|
|
# Say
|
|
|
|
#
|
|
|
|
# cmake CMakeLists.txt
|
|
|
|
#
|
2014-05-16 08:09:43 +02:00
|
|
|
# to create a Makefile that builds a static version of the library.
|
|
|
|
#
|
|
|
|
# For a dynamic library, use
|
2013-10-24 08:49:08 +02:00
|
|
|
#
|
|
|
|
# cmake CMakeLists.txt -DBUILD_SHARED_LIBS:BOOL=true
|
|
|
|
#
|
2014-05-16 08:09:43 +02:00
|
|
|
# For a framework on OS X, use
|
|
|
|
#
|
|
|
|
# cmake CMakeLists.txt -DBUILD_FRAMEWORK:BOOL=true -G Xcode
|
|
|
|
#
|
2013-10-24 08:49:08 +02:00
|
|
|
# instead. Please refer to the cmake manual for further options, in
|
|
|
|
# particular, how to modify compilation and linking parameters.
|
|
|
|
#
|
|
|
|
# Some notes.
|
|
|
|
#
|
|
|
|
# . `cmake' will overwrite FreeType's original (top-level) `Makefile' file.
|
|
|
|
#
|
|
|
|
# . You can use `cmake' directly on a freshly cloned FreeType git
|
|
|
|
# repository.
|
|
|
|
#
|
|
|
|
# . `CMakeLists.txt' is provided as-is since it is not used by the
|
|
|
|
# developer team.
|
|
|
|
|
|
|
|
|
|
|
|
cmake_minimum_required(VERSION 2.6)
|
|
|
|
|
|
|
|
project(freetype)
|
|
|
|
|
2014-05-16 08:09:43 +02:00
|
|
|
if (BUILD_FRAMEWORK)
|
|
|
|
if (NOT "${CMAKE_GENERATOR}" STREQUAL "Xcode")
|
|
|
|
message(FATAL_ERROR "You should use Xcode generator with BUILD_FRAMEWORK enabled")
|
|
|
|
endif ()
|
|
|
|
set(CMAKE_OSX_ARCHITECTURES "$(ARCHS_STANDARD_32_64_BIT)")
|
|
|
|
set(BUILD_SHARED_LIBS ON)
|
|
|
|
endif ()
|
|
|
|
|
2013-10-24 08:49:08 +02:00
|
|
|
set(VERSION_MAJOR "2")
|
|
|
|
set(VERSION_MINOR "5")
|
* Version 2.5.3 released.
=========================
Tag sources with `VER-2-5-3'.
* docs/VERSION.DLL: Update documentation and bump version number to
2.5.3.
* README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
builds/windows/vc2005/index.html,
builds/windows/vc2008/freetype.vcproj,
builds/windows/vc2008/index.html,
builds/windows/vc2010/freetype.vcxproj,
builds/windows/vc2010/index.html,
builds/windows/visualc/freetype.dsp,
builds/windows/visualc/freetype.vcproj,
builds/windows/visualc/index.html,
builds/windows/visualce/freetype.dsp,
builds/windows/visualce/freetype.vcproj,
builds/windows/visualce/index.html,
builds/wince/vc2005-ce/freetype.vcproj,
builds/wince/vc2005-ce/index.html,
builds/wince/vc2008-ce/freetype.vcproj,
builds/wince/vc2008-ce/index.html: s/2.5.2/2.5.3/, s/252/253/.
* include/freetype/freetype.h (FREETYPE_PATCH): Set to 3.
* builds/unix/configure.raw (version_info): Set to 17:2:11.
* CMakeLists.txt (VERSION_PATCH): Set to 3.
* docs/CHANGES: Updated.
2014-03-06 19:13:45 +01:00
|
|
|
set(VERSION_PATCH "3")
|
2013-10-24 08:49:08 +02:00
|
|
|
set(PROJECT_VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH})
|
|
|
|
|
|
|
|
# Compiler definitions for building the library
|
|
|
|
add_definitions(-DFT2_BUILD_LIBRARY)
|
|
|
|
|
|
|
|
# Specify library include directories
|
2014-03-20 07:13:12 +01:00
|
|
|
include_directories("${PROJECT_SOURCE_DIR}/include")
|
2013-10-24 08:49:08 +02:00
|
|
|
|
|
|
|
# Create the configuration file
|
2014-03-19 23:46:42 +01:00
|
|
|
message(STATUS "Creating directory, ${PROJECT_BINARY_DIR}/include/freetype2.")
|
|
|
|
file(MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/include/freetype2)
|
2013-10-24 08:49:08 +02:00
|
|
|
|
|
|
|
# For the auto-generated ftconfig.h file
|
2014-03-19 23:46:42 +01:00
|
|
|
include_directories(BEFORE "${PROJECT_BINARY_DIR}/include/freetype2")
|
|
|
|
message(STATUS "Creating ${PROJECT_BINARY_DIR}/include/freetype2/ftconfig.h.")
|
2013-10-24 08:49:08 +02:00
|
|
|
execute_process(
|
|
|
|
COMMAND sed -e "s/FT_CONFIG_OPTIONS_H/<ftoption.h>/" -e "s/FT_CONFIG_STANDARD_LIBRARY_H/<ftstdlib.h>/" -e "s?/undef ?#undef ?"
|
|
|
|
INPUT_FILE ${PROJECT_SOURCE_DIR}/builds/unix/ftconfig.in
|
2014-03-19 23:46:42 +01:00
|
|
|
OUTPUT_FILE ${PROJECT_BINARY_DIR}/include/freetype2/ftconfig.h
|
2013-10-24 08:49:08 +02:00
|
|
|
)
|
|
|
|
|
2014-05-16 08:09:43 +02:00
|
|
|
file(GLOB PUBLIC_HEADERS "include/*.h")
|
|
|
|
file(GLOB PUBLIC_CONFIG_HEADERS "include/config/*.h")
|
|
|
|
file(GLOB PRIVATE_HEADERS "include/internal/*.h")
|
|
|
|
|
2013-10-24 08:49:08 +02:00
|
|
|
set(BASE_SRCS
|
|
|
|
src/autofit/autofit.c
|
|
|
|
src/base/ftadvanc.c
|
|
|
|
src/base/ftbbox.c
|
2014-05-13 07:33:48 +02:00
|
|
|
src/base/ftbdf.c
|
2013-10-24 08:49:08 +02:00
|
|
|
src/base/ftbitmap.c
|
|
|
|
src/base/ftcalc.c
|
|
|
|
src/base/ftcid.c
|
|
|
|
src/base/ftdbgmem.c
|
|
|
|
src/base/ftdebug.c
|
|
|
|
src/base/ftfstype.c
|
|
|
|
src/base/ftgasp.c
|
|
|
|
src/base/ftgloadr.c
|
|
|
|
src/base/ftglyph.c
|
|
|
|
src/base/ftgxval.c
|
|
|
|
src/base/ftinit.c
|
|
|
|
src/base/ftlcdfil.c
|
|
|
|
src/base/ftmm.c
|
|
|
|
src/base/ftobjs.c
|
|
|
|
src/base/ftotval.c
|
|
|
|
src/base/ftoutln.c
|
|
|
|
src/base/ftpatent.c
|
|
|
|
src/base/ftpfr.c
|
|
|
|
src/base/ftrfork.c
|
|
|
|
src/base/ftsnames.c
|
|
|
|
src/base/ftstream.c
|
|
|
|
src/base/ftstroke.c
|
|
|
|
src/base/ftsynth.c
|
|
|
|
src/base/ftsystem.c
|
|
|
|
src/base/fttrigon.c
|
|
|
|
src/base/fttype1.c
|
|
|
|
src/base/ftutil.c
|
|
|
|
src/base/ftwinfnt.c
|
|
|
|
src/base/ftxf86.c
|
|
|
|
src/bdf/bdf.c
|
|
|
|
src/bzip2/ftbzip2.c
|
|
|
|
src/cache/ftcache.c
|
|
|
|
src/cff/cff.c
|
|
|
|
src/cid/type1cid.c
|
|
|
|
src/gzip/ftgzip.c
|
|
|
|
src/lzw/ftlzw.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/smooth/smooth.c
|
|
|
|
src/truetype/truetype.c
|
|
|
|
src/type1/type1.c
|
|
|
|
src/type42/type42.c
|
|
|
|
src/winfonts/winfnt.c
|
|
|
|
)
|
|
|
|
|
|
|
|
include_directories("src/truetype")
|
|
|
|
include_directories("src/sfnt")
|
|
|
|
include_directories("src/autofit")
|
|
|
|
include_directories("src/smooth")
|
|
|
|
include_directories("src/raster")
|
|
|
|
include_directories("src/psaux")
|
|
|
|
include_directories("src/psnames")
|
|
|
|
|
2014-05-16 08:09:43 +02:00
|
|
|
if (BUILD_FRAMEWORK)
|
|
|
|
set(BASE_SRCS
|
|
|
|
${BASE_SRCS}
|
|
|
|
builds/mac/freetype-Info.plist
|
|
|
|
)
|
|
|
|
endif ()
|
|
|
|
|
|
|
|
add_library(freetype
|
|
|
|
${PUBLIC_HEADERS}
|
|
|
|
${PUBLIC_CONFIG_HEADERS}
|
|
|
|
${PRIVATE_HEADERS}
|
|
|
|
${BASE_SRCS}
|
|
|
|
)
|
|
|
|
|
|
|
|
if (BUILD_FRAMEWORK)
|
|
|
|
set_property(SOURCE ${PUBLIC_CONFIG_HEADERS}
|
|
|
|
PROPERTY MACOSX_PACKAGE_LOCATION Headers/config
|
|
|
|
)
|
|
|
|
set_target_properties(freetype PROPERTIES
|
|
|
|
FRAMEWORK TRUE
|
|
|
|
MACOSX_FRAMEWORK_INFO_PLIST builds/mac/freetype-Info.plist
|
|
|
|
PUBLIC_HEADER "${PUBLIC_HEADERS}"
|
|
|
|
XCODE_ATTRIBUTE_INSTALL_PATH "@rpath"
|
|
|
|
)
|
|
|
|
endif ()
|
2013-10-24 08:49:08 +02:00
|
|
|
|
|
|
|
# Installations
|
2013-11-13 08:55:46 +01:00
|
|
|
# Note the trailing slash in the argument to the `DIRECTORY' directive
|
|
|
|
install(DIRECTORY ${PROJECT_SOURCE_DIR}/include/
|
2013-10-24 08:49:08 +02:00
|
|
|
DESTINATION include/freetype2
|
|
|
|
PATTERN "internal" EXCLUDE
|
|
|
|
)
|
|
|
|
install(TARGETS freetype
|
|
|
|
RUNTIME DESTINATION bin
|
|
|
|
LIBRARY DESTINATION lib
|
|
|
|
ARCHIVE DESTINATION lib
|
2014-05-16 08:09:43 +02:00
|
|
|
FRAMEWORK DESTINATION Library/Frameworks
|
2013-10-24 08:49:08 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
# Packaging
|
|
|
|
# CPack version numbers for release tarball name.
|
|
|
|
set(CPACK_PACKAGE_VERSION_MAJOR ${VERSION_MAJOR})
|
|
|
|
set(CPACK_PACKAGE_VERSION_MINOR ${VERSION_MINOR})
|
|
|
|
set(CPACK_PACKAGE_VERSION_PATCH ${VERSION_PATCH}})
|
|
|
|
if (NOT DEFINED CPACK_PACKAGE_DESCRIPTION_SUMMARY)
|
|
|
|
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${CMAKE_PROJECT_NAME}")
|
|
|
|
endif ()
|
|
|
|
if (NOT DEFINED CPACK_SOURCE_PACKAGE_FILE_NAME)
|
|
|
|
set(CPACK_SOURCE_PACKAGE_FILE_NAME
|
|
|
|
"${CMAKE_PROJECT_NAME}-${PROJECT_VERSION}-r${PROJECT_REV}"
|
|
|
|
CACHE INTERNAL "tarball basename"
|
|
|
|
)
|
|
|
|
endif ()
|
|
|
|
set(CPACK_SOURCE_GENERATOR TGZ)
|
|
|
|
set(CPACK_SOURCE_IGNORE_FILES
|
|
|
|
"/CVS/;/.svn/;.swp$;.#;/#;/build/;/serial/;/ser/;/parallel/;/par/;~;/preconfig.out;/autom4te.cache/;/.config")
|
|
|
|
set(CPACK_GENERATOR TGZ)
|
|
|
|
include(CPack)
|
|
|
|
|
|
|
|
# add make dist target
|
|
|
|
add_custom_target(dist COMMAND ${CMAKE_MAKE_PROGRAM} package_source)
|
|
|
|
|
|
|
|
# eof
|