2013-10-24 08:49:08 +02:00
|
|
|
# CMakeLists.txt
|
|
|
|
#
|
2015-01-17 20:41:43 +01:00
|
|
|
# Copyright 2013-2015 by
|
2013-10-24 08:49:08 +02:00
|
|
|
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
|
|
|
#
|
2015-06-28 11:07:07 +02:00
|
|
|
# Written originally by John Cary <cary@txcorp.com>
|
2013-10-24 08:49:08 +02:00
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
#
|
2015-06-28 11:07:07 +02:00
|
|
|
#
|
Another adjustment to header locations.
This change is a result of a discussion thread on freetype-devel
http://lists.nongnu.org/archive/html/freetype-devel/2015-06/msg00041.html
Re-introduce the `freetype2' subdirectory for all FreeType header
files after installation, and rename the `freetype2' subdirectory in
the git repository to `freetype'.
* include/freetype2: Renamed to...
* include/freetype: This.
* CMakeLists.txt (PUBLIC_HEADERS, PUBLIC_CONFIG_HEADERS,
PRIVATE_HEADERS): Updated.
Update creation of `ftconfig.h'.
Install generated `ftconfig.h'.
* Jamfile (HDRMACRO, RefDoc), autogen.sh: Updated.
* builds/amiga/include/config/ftconfig.h, builds/freetype.mk
(PUBLIC_DIR), builds/symbian/bld.inf, builds/toplevel.mk (work),
builds/unix/freetype2.in: Updated.
* builds/unix/freetype-config.in: Updated.
* builds/unix/configure.raw: Don't check for `rmdir'.
* builds/unix/unix-def.in (DELDIR): Use `rm -rf', which is portable
according to the autoconf info manual.
* builds/unix/install.mk (install, uninstall,
distclean_project_unix): Update and simplify.
* builds/wince/*, builds/windows/*: Updated.
* devel/ft2build.h, include/ft2build.h: Updated.
* include/freetype2/config/ftheader.h,
include/freetype2/internal/ftserv.h,
include/freetype2/internal/internal.h: Update all header file
macros.
* src/tools/chktrcmp.py (TRACE_DEF_FILES): Updated.
* docs/*: Updated.
2015-06-25 13:04:57 +02:00
|
|
|
# As a preliminary, create a compilation directory and change into it, for
|
|
|
|
# example
|
2013-10-24 08:49:08 +02:00
|
|
|
#
|
Another adjustment to header locations.
This change is a result of a discussion thread on freetype-devel
http://lists.nongnu.org/archive/html/freetype-devel/2015-06/msg00041.html
Re-introduce the `freetype2' subdirectory for all FreeType header
files after installation, and rename the `freetype2' subdirectory in
the git repository to `freetype'.
* include/freetype2: Renamed to...
* include/freetype: This.
* CMakeLists.txt (PUBLIC_HEADERS, PUBLIC_CONFIG_HEADERS,
PRIVATE_HEADERS): Updated.
Update creation of `ftconfig.h'.
Install generated `ftconfig.h'.
* Jamfile (HDRMACRO, RefDoc), autogen.sh: Updated.
* builds/amiga/include/config/ftconfig.h, builds/freetype.mk
(PUBLIC_DIR), builds/symbian/bld.inf, builds/toplevel.mk (work),
builds/unix/freetype2.in: Updated.
* builds/unix/freetype-config.in: Updated.
* builds/unix/configure.raw: Don't check for `rmdir'.
* builds/unix/unix-def.in (DELDIR): Use `rm -rf', which is portable
according to the autoconf info manual.
* builds/unix/install.mk (install, uninstall,
distclean_project_unix): Update and simplify.
* builds/wince/*, builds/windows/*: Updated.
* devel/ft2build.h, include/ft2build.h: Updated.
* include/freetype2/config/ftheader.h,
include/freetype2/internal/ftserv.h,
include/freetype2/internal/internal.h: Update all header file
macros.
* src/tools/chktrcmp.py (TRACE_DEF_FILES): Updated.
* docs/*: Updated.
2015-06-25 13:04:57 +02:00
|
|
|
# mkdir ~/freetype2.compiled
|
|
|
|
# cd ~/freetype2.compiled
|
2013-10-24 08:49:08 +02:00
|
|
|
#
|
Another adjustment to header locations.
This change is a result of a discussion thread on freetype-devel
http://lists.nongnu.org/archive/html/freetype-devel/2015-06/msg00041.html
Re-introduce the `freetype2' subdirectory for all FreeType header
files after installation, and rename the `freetype2' subdirectory in
the git repository to `freetype'.
* include/freetype2: Renamed to...
* include/freetype: This.
* CMakeLists.txt (PUBLIC_HEADERS, PUBLIC_CONFIG_HEADERS,
PRIVATE_HEADERS): Updated.
Update creation of `ftconfig.h'.
Install generated `ftconfig.h'.
* Jamfile (HDRMACRO, RefDoc), autogen.sh: Updated.
* builds/amiga/include/config/ftconfig.h, builds/freetype.mk
(PUBLIC_DIR), builds/symbian/bld.inf, builds/toplevel.mk (work),
builds/unix/freetype2.in: Updated.
* builds/unix/freetype-config.in: Updated.
* builds/unix/configure.raw: Don't check for `rmdir'.
* builds/unix/unix-def.in (DELDIR): Use `rm -rf', which is portable
according to the autoconf info manual.
* builds/unix/install.mk (install, uninstall,
distclean_project_unix): Update and simplify.
* builds/wince/*, builds/windows/*: Updated.
* devel/ft2build.h, include/ft2build.h: Updated.
* include/freetype2/config/ftheader.h,
include/freetype2/internal/ftserv.h,
include/freetype2/internal/internal.h: Update all header file
macros.
* src/tools/chktrcmp.py (TRACE_DEF_FILES): Updated.
* docs/*: Updated.
2015-06-25 13:04:57 +02:00
|
|
|
# Now you can say
|
|
|
|
#
|
|
|
|
# cmake <path-to-freetype2-src-dir>
|
2013-10-24 08:49:08 +02:00
|
|
|
#
|
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
|
|
|
#
|
2015-06-28 11:07:07 +02:00
|
|
|
# cmake <path-to-freetype2-src-dir> -D BUILD_SHARED_LIBS:BOOL=true
|
2013-10-24 08:49:08 +02:00
|
|
|
#
|
2014-05-16 08:09:43 +02:00
|
|
|
# For a framework on OS X, use
|
|
|
|
#
|
2015-06-28 11:07:07 +02:00
|
|
|
# cmake <path-to-freetype2-src-dir> -D BUILD_FRAMEWORK:BOOL=true -G Xcode
|
2014-05-16 08:09:43 +02:00
|
|
|
#
|
2014-10-18 10:42:28 +02:00
|
|
|
# instead.
|
|
|
|
#
|
|
|
|
# For an iOS static library, use
|
|
|
|
#
|
2015-06-28 11:07:07 +02:00
|
|
|
# cmake <path-to-freetype2-src-dir> -D IOS_PLATFORM=OS -G Xcode
|
2014-10-18 10:42:28 +02:00
|
|
|
#
|
|
|
|
# or
|
|
|
|
#
|
2015-06-28 11:07:07 +02:00
|
|
|
# cmake <path-to-freetype2-src-dir> -D IOS_PLATFORM=SIMULATOR -G Xcode
|
2014-10-18 10:42:28 +02:00
|
|
|
#
|
|
|
|
# Please refer to the cmake manual for further options, in particular, how
|
|
|
|
# to modify compilation and linking parameters.
|
2013-10-24 08:49:08 +02:00
|
|
|
#
|
|
|
|
# Some notes.
|
|
|
|
#
|
2015-06-28 11:07:07 +02:00
|
|
|
# . `cmake' creates configuration files in
|
|
|
|
#
|
|
|
|
# <build-directory>/include/freetype/config
|
|
|
|
#
|
|
|
|
# which should be further modified if necessary.
|
2013-10-24 08:49:08 +02:00
|
|
|
#
|
|
|
|
# . You can use `cmake' directly on a freshly cloned FreeType git
|
|
|
|
# repository.
|
|
|
|
#
|
2015-06-28 11:07:07 +02:00
|
|
|
# . `CMakeLists.txt' is provided as-is since it is normally not used by the
|
2013-10-24 08:49:08 +02:00
|
|
|
# developer team.
|
|
|
|
|
|
|
|
|
|
|
|
cmake_minimum_required(VERSION 2.6)
|
|
|
|
|
2015-06-28 10:42:47 +02:00
|
|
|
|
|
|
|
include(CheckIncludeFile)
|
|
|
|
|
|
|
|
|
2014-10-18 10:42:28 +02:00
|
|
|
# CMAKE_TOOLCHAIN_FILE must be set before `project' is called, which
|
|
|
|
# configures the base build environment and references the toolchain file
|
|
|
|
if (APPLE)
|
|
|
|
if (DEFINED IOS_PLATFORM)
|
|
|
|
if (NOT "${IOS_PLATFORM}" STREQUAL "OS"
|
|
|
|
AND NOT "${IOS_PLATFORM}" STREQUAL "SIMULATOR")
|
|
|
|
message(FATAL_ERROR
|
|
|
|
"IOS_PLATFORM must be set to either OS or SIMULATOR")
|
|
|
|
endif ()
|
|
|
|
if (NOT "${CMAKE_GENERATOR}" STREQUAL "Xcode")
|
|
|
|
message(AUTHOR_WARNING
|
|
|
|
"You should use Xcode generator with IOS_PLATFORM enabled to get Universal builds.")
|
|
|
|
endif ()
|
|
|
|
if (BUILD_SHARED_LIBS)
|
|
|
|
message(FATAL_ERROR
|
|
|
|
"BUILD_SHARED_LIBS can not be on with IOS_PLATFORM enabled")
|
|
|
|
endif ()
|
|
|
|
if (BUILD_FRAMEWORK)
|
|
|
|
message(FATAL_ERROR
|
|
|
|
"BUILD_FRAMEWORK can not be on with IOS_PLATFORM enabled")
|
|
|
|
endif ()
|
|
|
|
|
|
|
|
# iOS only uses static libraries
|
|
|
|
set(BUILD_SHARED_LIBS OFF)
|
|
|
|
|
|
|
|
set(CMAKE_TOOLCHAIN_FILE
|
|
|
|
${PROJECT_SOURCE_DIR}/builds/cmake/iOS.cmake)
|
|
|
|
endif ()
|
|
|
|
else ()
|
|
|
|
if (DEFINED IOS_PLATFORM)
|
|
|
|
message(FATAL_ERROR "IOS_PLATFORM is not supported on this platform")
|
|
|
|
endif ()
|
|
|
|
endif ()
|
|
|
|
|
2015-06-28 10:26:33 +02:00
|
|
|
|
2013-10-24 08:49:08 +02:00
|
|
|
project(freetype)
|
|
|
|
|
2015-06-28 10:26:33 +02:00
|
|
|
|
2015-10-20 07:19:44 +02:00
|
|
|
if (WIN32 AND NOT MINGW AND BUILD_SHARED_LIBS)
|
|
|
|
message(FATAL_ERROR "Building shared libraries on Windows needs MinGW")
|
|
|
|
endif ()
|
|
|
|
|
2015-06-28 10:26:33 +02:00
|
|
|
# Disallow in-source builds
|
|
|
|
if ("${PROJECT_BINARY_DIR}" STREQUAL "${PROJECT_SOURCE_DIR}")
|
|
|
|
message(FATAL_ERROR
|
|
|
|
"
|
|
|
|
In-source builds are not permitted! Make a separate folder for"
|
|
|
|
" building, e.g.,"
|
|
|
|
"
|
|
|
|
mkdir build; cd build; cmake .."
|
|
|
|
"
|
|
|
|
Before that, remove the files created by this failed run with"
|
|
|
|
"
|
|
|
|
rm -rf CMakeCache.txt CMakeFiles")
|
|
|
|
endif ()
|
|
|
|
|
|
|
|
|
2015-06-28 11:03:10 +02:00
|
|
|
# Add local cmake modules
|
|
|
|
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}/builds)
|
|
|
|
|
|
|
|
|
2014-05-16 08:09:43 +02:00
|
|
|
if (BUILD_FRAMEWORK)
|
|
|
|
if (NOT "${CMAKE_GENERATOR}" STREQUAL "Xcode")
|
2014-10-18 10:42:28 +02:00
|
|
|
message(FATAL_ERROR
|
|
|
|
"You should use Xcode generator with BUILD_FRAMEWORK enabled")
|
2014-05-16 08:09:43 +02:00
|
|
|
endif ()
|
|
|
|
set(CMAKE_OSX_ARCHITECTURES "$(ARCHS_STANDARD_32_64_BIT)")
|
|
|
|
set(BUILD_SHARED_LIBS ON)
|
|
|
|
endif ()
|
|
|
|
|
2015-06-28 11:03:10 +02:00
|
|
|
|
2013-10-24 08:49:08 +02:00
|
|
|
set(VERSION_MAJOR "2")
|
* Version 2.6 released.
=======================
Tag sources with `VER-2-6'.
* docs/VERSION.DLL: Update documentation and bump version number to
2.6.
* 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.5/2.6/, s/255/26/.
* include/freetype/freetype.h (FREETYPE_MINOR): Set to 6.
(FREETYPE_PATCH): Set to 0.
* builds/unix/configure.raw (version_info): Set to 18:0:12.
* CMakeLists.txt (VERSION_MINOR): Set to 0.
(VERSION_PATCH): Set to 6.
* src/autofit/afmodule.c [!FT_MAKE_OPTION_SINGLE_OBJECT]: Add
declarations for dumping functions.
* src/truetype/ttinterp.c (TT_New_Context): Pacify compiler.
* builds/toplevel.mk: Use `freetype.mk's code to compute the version
string.
Don't include a zero patch level in version string.
* builds/freetype.mk: Remove code for computing the version string.
2015-06-07 16:11:18 +02:00
|
|
|
set(VERSION_MINOR "6")
|
* Version 2.6.1 released.
=========================
Tag sources with `VER-2-6-1'.
* docs/VERSION.DLL: Update documentation and bump version number to
2.6.1.
* 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.6/2.6.1/, s/26/261/.
* include/freetype/freetype.h (FREETYPE_PATCH): Set to 1.
* builds/unix/configure.raw (version_info): Set to 18:1:12.
* CMakeLists.txt (VERSION_PATCH): Set to 1.
* src/autofit/afmodule.c [AF_DEBUG_AUTOFIT]: Ensure C linking for
dumping functions.
2015-10-04 08:18:01 +02:00
|
|
|
set(VERSION_PATCH "1")
|
2015-08-02 18:35:49 +02:00
|
|
|
|
2013-10-24 08:49:08 +02:00
|
|
|
set(PROJECT_VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH})
|
2015-08-02 18:35:49 +02:00
|
|
|
set(SHARED_LIBRARY_VERSION ${VERSION_MAJOR}.${VERSION_MINOR})
|
2013-10-24 08:49:08 +02:00
|
|
|
|
2015-06-28 11:03:10 +02:00
|
|
|
|
2013-10-24 08:49:08 +02:00
|
|
|
# Compiler definitions for building the library
|
|
|
|
add_definitions(-DFT2_BUILD_LIBRARY)
|
|
|
|
|
2015-06-28 10:42:47 +02:00
|
|
|
|
2015-06-28 11:03:10 +02:00
|
|
|
# Find dependencies
|
|
|
|
find_package(ZLIB)
|
|
|
|
find_package(BZip2)
|
|
|
|
find_package(PNG)
|
|
|
|
find_package(HarfBuzz)
|
|
|
|
|
|
|
|
|
2015-06-28 10:42:47 +02:00
|
|
|
message(STATUS
|
|
|
|
"Creating directory ${PROJECT_BINARY_DIR}/include/freetype/config")
|
|
|
|
file(MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/include/freetype/config")
|
2013-10-24 08:49:08 +02:00
|
|
|
|
2015-06-28 11:03:10 +02:00
|
|
|
|
2013-10-24 08:49:08 +02:00
|
|
|
# Create the configuration file
|
2015-06-28 11:40:02 +02:00
|
|
|
message(STATUS
|
|
|
|
"Creating file ${PROJECT_BINARY_DIR}/include/freetype/config/ftconfig.h")
|
|
|
|
|
2015-06-25 16:38:11 +02:00
|
|
|
if (UNIX)
|
2015-06-28 10:42:47 +02:00
|
|
|
check_include_file("unistd.h" HAVE_UNISTD_H)
|
|
|
|
check_include_file("fcntl.h" HAVE_FCNTL_H)
|
|
|
|
check_include_file("stdint.h" HAVE_STDINT_H)
|
2013-10-24 08:49:08 +02:00
|
|
|
|
2015-06-25 16:38:11 +02:00
|
|
|
file(READ "${PROJECT_SOURCE_DIR}/builds/unix/ftconfig.in"
|
|
|
|
FTCONFIG_H)
|
2015-06-28 10:42:47 +02:00
|
|
|
if (HAVE_UNISTD_H)
|
|
|
|
string(REGEX REPLACE
|
|
|
|
"#undef +(HAVE_UNISTD_H)" "#define \\1"
|
|
|
|
FTCONFIG_H "${FTCONFIG_H}")
|
|
|
|
endif ()
|
|
|
|
if (HAVE_FCNTL_H)
|
|
|
|
string(REGEX REPLACE
|
|
|
|
"#undef +(HAVE_FCNTL_H)" "#define \\1"
|
|
|
|
FTCONFIG_H "${FTCONFIG_H}")
|
|
|
|
endif ()
|
|
|
|
if (HAVE_STDINT_H)
|
|
|
|
string(REGEX REPLACE
|
|
|
|
"#undef +(HAVE_STDINT_H)" "#define \\1"
|
|
|
|
FTCONFIG_H "${FTCONFIG_H}")
|
|
|
|
endif ()
|
2015-06-25 16:38:11 +02:00
|
|
|
string(REPLACE "/undef " "#undef "
|
|
|
|
FTCONFIG_H "${FTCONFIG_H}")
|
|
|
|
file(WRITE "${PROJECT_BINARY_DIR}/include/freetype/config/ftconfig.h"
|
|
|
|
"${FTCONFIG_H}")
|
2015-06-28 11:40:02 +02:00
|
|
|
else ()
|
|
|
|
file(READ "${PROJECT_SOURCE_DIR}/include/freetype/config/ftconfig.h"
|
|
|
|
FTCONFIG_H)
|
|
|
|
file(WRITE "${PROJECT_BINARY_DIR}/include/freetype/config/ftconfig.h"
|
|
|
|
"${FTCONFIG_H}")
|
2015-06-25 16:38:11 +02:00
|
|
|
endif ()
|
2013-10-24 08:49:08 +02:00
|
|
|
|
2015-06-28 10:42:47 +02:00
|
|
|
|
2015-06-28 11:03:10 +02:00
|
|
|
# Create the options file
|
|
|
|
message(STATUS
|
|
|
|
"Creating file ${PROJECT_BINARY_DIR}/include/freetype/config/ftoption.h")
|
|
|
|
|
|
|
|
file(READ "${PROJECT_SOURCE_DIR}/include/freetype/config/ftoption.h"
|
|
|
|
FTOPTION_H)
|
|
|
|
if (ZLIB_FOUND)
|
|
|
|
string(REGEX REPLACE
|
|
|
|
"/\\* +(#define +FT_CONFIG_OPTION_SYSTEM_ZLIB) +\\*/" "\\1"
|
|
|
|
FTOPTION_H "${FTOPTION_H}")
|
|
|
|
endif ()
|
|
|
|
if (BZIP2_FOUND)
|
|
|
|
string(REGEX REPLACE
|
|
|
|
"/\\* +(#define +FT_CONFIG_OPTION_USE_BZIP2) +\\*/" "\\1"
|
|
|
|
FTOPTION_H "${FTOPTION_H}")
|
|
|
|
endif ()
|
|
|
|
if (PNG_FOUND)
|
|
|
|
string(REGEX REPLACE
|
|
|
|
"/\\* +(#define +FT_CONFIG_OPTION_USE_PNG) +\\*/" "\\1"
|
|
|
|
FTOPTION_H "${FTOPTION_H}")
|
|
|
|
endif ()
|
|
|
|
if (HARFBUZZ_FOUND)
|
|
|
|
string(REGEX REPLACE
|
|
|
|
"/\\* +(#define +FT_CONFIG_OPTION_USE_HARFBUZZ) +\\*/" "\\1"
|
|
|
|
FTOPTION_H "${FTOPTION_H}")
|
|
|
|
endif ()
|
|
|
|
file(WRITE "${PROJECT_BINARY_DIR}/include/freetype/config/ftoption.h"
|
|
|
|
"${FTOPTION_H}")
|
|
|
|
|
|
|
|
|
2015-06-28 10:42:47 +02:00
|
|
|
# Specify library include directories
|
|
|
|
include_directories("${PROJECT_SOURCE_DIR}/include")
|
|
|
|
include_directories(BEFORE "${PROJECT_BINARY_DIR}/include")
|
|
|
|
|
|
|
|
|
Another adjustment to header locations.
This change is a result of a discussion thread on freetype-devel
http://lists.nongnu.org/archive/html/freetype-devel/2015-06/msg00041.html
Re-introduce the `freetype2' subdirectory for all FreeType header
files after installation, and rename the `freetype2' subdirectory in
the git repository to `freetype'.
* include/freetype2: Renamed to...
* include/freetype: This.
* CMakeLists.txt (PUBLIC_HEADERS, PUBLIC_CONFIG_HEADERS,
PRIVATE_HEADERS): Updated.
Update creation of `ftconfig.h'.
Install generated `ftconfig.h'.
* Jamfile (HDRMACRO, RefDoc), autogen.sh: Updated.
* builds/amiga/include/config/ftconfig.h, builds/freetype.mk
(PUBLIC_DIR), builds/symbian/bld.inf, builds/toplevel.mk (work),
builds/unix/freetype2.in: Updated.
* builds/unix/freetype-config.in: Updated.
* builds/unix/configure.raw: Don't check for `rmdir'.
* builds/unix/unix-def.in (DELDIR): Use `rm -rf', which is portable
according to the autoconf info manual.
* builds/unix/install.mk (install, uninstall,
distclean_project_unix): Update and simplify.
* builds/wince/*, builds/windows/*: Updated.
* devel/ft2build.h, include/ft2build.h: Updated.
* include/freetype2/config/ftheader.h,
include/freetype2/internal/ftserv.h,
include/freetype2/internal/internal.h: Update all header file
macros.
* src/tools/chktrcmp.py (TRACE_DEF_FILES): Updated.
* docs/*: Updated.
2015-06-25 13:04:57 +02:00
|
|
|
file(GLOB PUBLIC_HEADERS "include/ft2build.h" "include/freetype/*.h")
|
|
|
|
file(GLOB PUBLIC_CONFIG_HEADERS "include/freetype/config/*.h")
|
|
|
|
file(GLOB PRIVATE_HEADERS "include/freetype/internal/*.h")
|
2014-05-16 08:09:43 +02:00
|
|
|
|
2015-06-28 11:07:07 +02:00
|
|
|
|
2013-10-24 08:49:08 +02:00
|
|
|
set(BASE_SRCS
|
|
|
|
src/autofit/autofit.c
|
2015-06-25 15:45:13 +02:00
|
|
|
src/base/ftbase.c
|
2013-10-24 08:49:08 +02:00
|
|
|
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/ftcid.c
|
Rename `ftxf86.[ch]' to `ftfntfmt.[ch]'.
CMakeLists.txt, builds/amiga/makefile, builds/amiga/makefile.os4,
builds/amiga/smakefile, builds/mac/FreeType.m68k_cfm.make.txt,
builds/mac/FreeType.m68k_far.make.txt,
builds/mac/FreeType.ppc_carbon.make.txt,
builds/mac/FreeType.ppc_classic.make.txt, builds/symbian/bld.inf,
builds/symbian/freetype.mmp, builds/wince/vc2005-ce/freetype.vcproj,
builds/wince/vc2008-ce/freetype.vcproj,
builds/windows/vc2005/freetype.vcproj,
builds/windows/vc2008/freetype.vcproj,
builds/windows/vc2010/freetype.vcxproj,
builds/windows/vc2010/freetype.vcxproj.filters,
builds/windows/visualc/freetype.dsp,
builds/windows/visualc/freetype.vcproj,
builds/windows/visualce/freetype.dsp,
builds/windows/visualce/freetype.vcproj, docs/INSTALL.ANY,
include/config/ftheader.h, include/ftfntfmt.h, modules.cfg,
src/base/ftfntfmt.c, vms_make.com: Updated.
2015-03-11 06:30:23 +01:00
|
|
|
src/base/ftfntfmt.c
|
2013-10-24 08:49:08 +02:00
|
|
|
src/base/ftfstype.c
|
|
|
|
src/base/ftgasp.c
|
|
|
|
src/base/ftglyph.c
|
|
|
|
src/base/ftgxval.c
|
|
|
|
src/base/ftinit.c
|
|
|
|
src/base/ftlcdfil.c
|
|
|
|
src/base/ftmm.c
|
|
|
|
src/base/ftotval.c
|
|
|
|
src/base/ftpatent.c
|
|
|
|
src/base/ftpfr.c
|
|
|
|
src/base/ftstroke.c
|
|
|
|
src/base/ftsynth.c
|
|
|
|
src/base/ftsystem.c
|
|
|
|
src/base/fttype1.c
|
|
|
|
src/base/ftwinfnt.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
|
2015-06-25 15:45:13 +02:00
|
|
|
src/psnames/psnames.c
|
2013-10-24 08:49:08 +02:00
|
|
|
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
|
|
|
|
)
|
|
|
|
|
2015-06-26 06:46:59 +02:00
|
|
|
if (WIN32)
|
|
|
|
set(BASE_SRCS ${BASE_SRCS} builds/windows/ftdebug.c)
|
|
|
|
elseif (WINCE)
|
|
|
|
set(BASE_SRCS ${BASE_SRCS} builds/wince/ftdebug.c)
|
|
|
|
else ()
|
|
|
|
set(BASE_SRCS ${BASE_SRCS} src/base/ftdebug.c)
|
|
|
|
endif ()
|
|
|
|
|
2013-10-24 08:49:08 +02:00
|
|
|
|
2014-05-16 08:09:43 +02:00
|
|
|
if (BUILD_FRAMEWORK)
|
|
|
|
set(BASE_SRCS
|
|
|
|
${BASE_SRCS}
|
|
|
|
builds/mac/freetype-Info.plist
|
|
|
|
)
|
|
|
|
endif ()
|
|
|
|
|
2015-06-28 11:07:07 +02:00
|
|
|
|
2014-05-16 08:09:43 +02:00
|
|
|
add_library(freetype
|
|
|
|
${PUBLIC_HEADERS}
|
|
|
|
${PUBLIC_CONFIG_HEADERS}
|
|
|
|
${PRIVATE_HEADERS}
|
|
|
|
${BASE_SRCS}
|
|
|
|
)
|
|
|
|
|
2015-06-28 11:07:07 +02:00
|
|
|
|
2015-08-02 18:35:49 +02:00
|
|
|
if (BUILD_SHARED_LIBS)
|
|
|
|
set_target_properties(freetype PROPERTIES
|
|
|
|
VERSION ${PROJECT_VERSION}
|
|
|
|
SOVERSION ${SHARED_LIBRARY_VERSION}
|
|
|
|
COMPILE_DEFINITIONS freetype_EXPORTS
|
|
|
|
)
|
|
|
|
endif ()
|
|
|
|
|
|
|
|
|
2014-05-16 08:09:43 +02:00
|
|
|
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
|
|
|
|
2015-06-28 11:03:10 +02:00
|
|
|
|
2015-06-28 11:06:47 +02:00
|
|
|
if (MSVC)
|
|
|
|
set_target_properties(freetype PROPERTIES
|
|
|
|
COMPILE_FLAGS /Fd"$(IntDir)$(TargetName).pdb")
|
|
|
|
endif ()
|
|
|
|
|
|
|
|
|
2015-06-28 11:03:10 +02:00
|
|
|
if (ZLIB_FOUND)
|
|
|
|
target_link_libraries(freetype ${ZLIB_LIBRARIES})
|
|
|
|
include_directories(${ZLIB_INCLUDE_DIRS})
|
|
|
|
endif ()
|
|
|
|
if (BZIP2_FOUND)
|
|
|
|
target_link_libraries(freetype ${BZIP2_LIBRARIES})
|
|
|
|
include_directories(${BZIP2_INCLUDE_DIR}) # not BZIP2_INCLUDE_DIRS
|
|
|
|
endif ()
|
|
|
|
if (PNG_FOUND)
|
|
|
|
add_definitions(${PNG_DEFINITIONS})
|
|
|
|
target_link_libraries(freetype ${PNG_LIBRARIES})
|
|
|
|
include_directories(${PNG_INCLUDE_DIRS})
|
|
|
|
endif ()
|
|
|
|
if (HARFBUZZ_FOUND)
|
|
|
|
target_link_libraries(freetype ${HARFBUZZ_LIBRARIES})
|
|
|
|
include_directories(${HARFBUZZ_INCLUDE_DIRS})
|
|
|
|
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
|
Another adjustment to header locations.
This change is a result of a discussion thread on freetype-devel
http://lists.nongnu.org/archive/html/freetype-devel/2015-06/msg00041.html
Re-introduce the `freetype2' subdirectory for all FreeType header
files after installation, and rename the `freetype2' subdirectory in
the git repository to `freetype'.
* include/freetype2: Renamed to...
* include/freetype: This.
* CMakeLists.txt (PUBLIC_HEADERS, PUBLIC_CONFIG_HEADERS,
PRIVATE_HEADERS): Updated.
Update creation of `ftconfig.h'.
Install generated `ftconfig.h'.
* Jamfile (HDRMACRO, RefDoc), autogen.sh: Updated.
* builds/amiga/include/config/ftconfig.h, builds/freetype.mk
(PUBLIC_DIR), builds/symbian/bld.inf, builds/toplevel.mk (work),
builds/unix/freetype2.in: Updated.
* builds/unix/freetype-config.in: Updated.
* builds/unix/configure.raw: Don't check for `rmdir'.
* builds/unix/unix-def.in (DELDIR): Use `rm -rf', which is portable
according to the autoconf info manual.
* builds/unix/install.mk (install, uninstall,
distclean_project_unix): Update and simplify.
* builds/wince/*, builds/windows/*: Updated.
* devel/ft2build.h, include/ft2build.h: Updated.
* include/freetype2/config/ftheader.h,
include/freetype2/internal/ftserv.h,
include/freetype2/internal/internal.h: Update all header file
macros.
* src/tools/chktrcmp.py (TRACE_DEF_FILES): Updated.
* docs/*: Updated.
2015-06-25 13:04:57 +02:00
|
|
|
PATTERN "ftconfig.h" EXCLUDE
|
2015-06-28 11:40:02 +02:00
|
|
|
PATTERN "ftoption.h" EXCLUDE
|
Another adjustment to header locations.
This change is a result of a discussion thread on freetype-devel
http://lists.nongnu.org/archive/html/freetype-devel/2015-06/msg00041.html
Re-introduce the `freetype2' subdirectory for all FreeType header
files after installation, and rename the `freetype2' subdirectory in
the git repository to `freetype'.
* include/freetype2: Renamed to...
* include/freetype: This.
* CMakeLists.txt (PUBLIC_HEADERS, PUBLIC_CONFIG_HEADERS,
PRIVATE_HEADERS): Updated.
Update creation of `ftconfig.h'.
Install generated `ftconfig.h'.
* Jamfile (HDRMACRO, RefDoc), autogen.sh: Updated.
* builds/amiga/include/config/ftconfig.h, builds/freetype.mk
(PUBLIC_DIR), builds/symbian/bld.inf, builds/toplevel.mk (work),
builds/unix/freetype2.in: Updated.
* builds/unix/freetype-config.in: Updated.
* builds/unix/configure.raw: Don't check for `rmdir'.
* builds/unix/unix-def.in (DELDIR): Use `rm -rf', which is portable
according to the autoconf info manual.
* builds/unix/install.mk (install, uninstall,
distclean_project_unix): Update and simplify.
* builds/wince/*, builds/windows/*: Updated.
* devel/ft2build.h, include/ft2build.h: Updated.
* include/freetype2/config/ftheader.h,
include/freetype2/internal/ftserv.h,
include/freetype2/internal/internal.h: Update all header file
macros.
* src/tools/chktrcmp.py (TRACE_DEF_FILES): Updated.
* docs/*: Updated.
2015-06-25 13:04:57 +02:00
|
|
|
)
|
2015-06-28 11:40:02 +02:00
|
|
|
install(FILES
|
|
|
|
${PROJECT_BINARY_DIR}/include/freetype/config/ftconfig.h
|
|
|
|
${PROJECT_BINARY_DIR}/include/freetype/config/ftoption.h
|
Another adjustment to header locations.
This change is a result of a discussion thread on freetype-devel
http://lists.nongnu.org/archive/html/freetype-devel/2015-06/msg00041.html
Re-introduce the `freetype2' subdirectory for all FreeType header
files after installation, and rename the `freetype2' subdirectory in
the git repository to `freetype'.
* include/freetype2: Renamed to...
* include/freetype: This.
* CMakeLists.txt (PUBLIC_HEADERS, PUBLIC_CONFIG_HEADERS,
PRIVATE_HEADERS): Updated.
Update creation of `ftconfig.h'.
Install generated `ftconfig.h'.
* Jamfile (HDRMACRO, RefDoc), autogen.sh: Updated.
* builds/amiga/include/config/ftconfig.h, builds/freetype.mk
(PUBLIC_DIR), builds/symbian/bld.inf, builds/toplevel.mk (work),
builds/unix/freetype2.in: Updated.
* builds/unix/freetype-config.in: Updated.
* builds/unix/configure.raw: Don't check for `rmdir'.
* builds/unix/unix-def.in (DELDIR): Use `rm -rf', which is portable
according to the autoconf info manual.
* builds/unix/install.mk (install, uninstall,
distclean_project_unix): Update and simplify.
* builds/wince/*, builds/windows/*: Updated.
* devel/ft2build.h, include/ft2build.h: Updated.
* include/freetype2/config/ftheader.h,
include/freetype2/internal/ftserv.h,
include/freetype2/internal/internal.h: Update all header file
macros.
* src/tools/chktrcmp.py (TRACE_DEF_FILES): Updated.
* docs/*: Updated.
2015-06-25 13:04:57 +02:00
|
|
|
DESTINATION include/freetype2/freetype/config
|
2013-10-24 08:49:08 +02:00
|
|
|
)
|
|
|
|
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
|
|
|
)
|
|
|
|
|
2015-06-28 11:07:07 +02:00
|
|
|
|
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)
|
|
|
|
|
2015-06-28 11:07:07 +02:00
|
|
|
|
2013-10-24 08:49:08 +02:00
|
|
|
# add make dist target
|
|
|
|
add_custom_target(dist COMMAND ${CMAKE_MAKE_PROGRAM} package_source)
|
|
|
|
|
2015-06-28 11:07:07 +02:00
|
|
|
|
2013-10-24 08:49:08 +02:00
|
|
|
# eof
|