Compare commits

...

6 Commits

Author SHA1 Message Date
Nikolaus Waxweiler 8d290d5626 CMakeLists.txt: install freetype.m4 on Unixoids 2019-07-11 23:13:58 +01:00
Nikolaus Waxweiler 708991c6cb CMakeLists.txt: Expand sources
This generates a more comprehensive compile_commands.json.
2019-07-11 22:15:42 +01:00
Nikolaus Waxweiler e605ce02d4 CMakeLists.txt: more info on build configs 2019-07-11 22:14:49 +01:00
Nikolaus Waxweiler 155e60e3e8 CMakeLists.txt: use builds/unix/ftsystem.c on Unixoids 2019-07-10 19:44:15 +01:00
Nikolaus Waxweiler 28250b73b7 CMakeLists.txt: Update LIBRARY_VERSION 2019-07-10 19:43:45 +01:00
Nikolaus Waxweiler db5fa06098 CMakeLists.txt: Some documentation updates 2019-07-10 19:43:05 +01:00
1 changed files with 160 additions and 41 deletions

View File

@ -14,30 +14,30 @@
#
# The following will 1. create a build directory and 2. change into it and
# call cmake to configure the build with default parameters as a static
# library.
# library. See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html
# for information about Debug, Release, etc. builds.
#
# cmake -E make_directory build
# cmake -E chdir build cmake ..
# cmake -B build -D CMAKE_BUILD_TYPE=Release
#
# For a dynamic library, use
#
# cmake -E chdir build cmake -D BUILD_SHARED_LIBS:BOOL=true ..
# cmake -B build -D BUILD_SHARED_LIBS=true -D CMAKE_BUILD_TYPE=Release
#
# For a framework on OS X, use
#
# cmake -E chdir build cmake -G Xcode -D BUILD_FRAMEWORK:BOOL=true ..
# cmake -B build -G Xcode -D BUILD_FRAMEWORK=true
#
# For an iOS static library, use
#
# cmake -E chdir build cmake -G Xcode -D IOS_PLATFORM=OS ..
# cmake -B build -G Xcode -D IOS_PLATFORM=OS
#
# or
#
# cmake -E chdir build cmake -G Xcode -D IOS_PLATFORM=SIMULATOR ..
# cmake -B build -G Xcode -D IOS_PLATFORM=SIMULATOR
#
# or
#
# cmake -E chdir build cmake -G Xcode -D IOS_PLATFORM=SIMULATOR64 ..
# cmake -B build -G Xcode -D IOS_PLATFORM=SIMULATOR64
#
# Finally, build the project with:
#
@ -49,7 +49,7 @@
#
# A binary distribution can be made with
#
# cmake --build build --config Release --target package
# cmake --build build --target package
#
# Please refer to the cmake manual for further options, in particular, how
# to modify compilation and linking parameters.
@ -68,14 +68,22 @@
# . `CMakeLists.txt' is provided as-is since it is normally not used by the
# developer team.
#
# . Set the `FT_WITH_ZLIB', `FT_WITH_BZIP2', `FT_WITH_PNG', and
# `FT_WITH_HARFBUZZ' CMake variables to `ON' to force using a dependency.
# Leave a variable undefined (which is the default) to use the dependency
# only if it is available. Set `CMAKE_DISABLE_FIND_PACKAGE_HarfBuzz=TRUE' to
# disable a dependency completely (CMake package name, so `BZip2' instead of
# `BZIP2'). Example:
# . The detection of external library dependencies is automatic, like
# with the default build system. Set the `FT_WITH_ZLIB', `FT_WITH_BZIP2',
# `FT_WITH_PNG', and `FT_WITH_HARFBUZZ' CMake variables to `ON' to force using
# a dependency, e.g.:
#
# cmake -DFT_WITH_ZLIB=ON -DCMAKE_DISABLE_FIND_PACKAGE_HarfBuzz=TRUE [...]
# cmake -B build -D FT_WITH_ZLIB=ON -D FT_WITH_BZIP2=ON \
# -D FT_WITH_PNG=ON -D FT_WITH_HARFBUZZ=ON [...]
#
# Use the `CMAKE_DISABLE_FIND_PACKAGE_X=TRUE' variables to
# disable a dependency completely (CMake package name, so `BZip2' instead of
# `BZIP2'), e.g.:
#
# cmake -B build -D CMAKE_DISABLE_FIND_PACKAGE_ZLIB=TRUE \
# -D CMAKE_DISABLE_FIND_PACKAGE_BZip2=TRUE \
# -D CMAKE_DISABLE_FIND_PACKAGE_PNG=TRUE \
# -D CMAKE_DISABLE_FIND_PACKAGE_HarfBuzz=TRUE [...]
#
# . Installation of FreeType can be controlled with the CMake variables
# `SKIP_INSTALL_HEADERS', `SKIP_INSTALL_LIBRARIES', and `SKIP_INSTALL_ALL'
@ -144,13 +152,11 @@ set(VERSION_PATCH "1")
# Increment AGE. Set REVISION to 0
# If the source code was changed, but there were no interface changes:
# Increment REVISION.
set(LIBRARY_VERSION "6.16.0")
set(LIBRARY_VERSION "6.17.1")
set(LIBRARY_SOVERSION "6")
# These options mean "require x and complain if not found". They'll get
# optionally found anyway. Use `-DCMAKE_DISABLE_FIND_PACKAGE_x=TRUE` to disable
# searching for a packge entirely (x is the CMake package name, so "BZip2"
# instead of "BZIP2").
# External dependency library detection is automatic. See the top of this file,
# notes section, for how to force or disable dependencies completely.
option(FT_WITH_ZLIB "Use system zlib instead of internal library." OFF)
option(FT_WITH_BZIP2 "Support bzip2 compressed fonts." OFF)
option(FT_WITH_PNG "Support PNG compressed OpenType embedded bitmaps." OFF)
@ -291,47 +297,150 @@ file(GLOB PRIVATE_HEADERS "include/freetype/internal/*.h")
set(BASE_SRCS
src/autofit/autofit.c
src/base/ftbase.c
src/autofit/afangles.c
src/autofit/afblue.c
src/autofit/afcjk.c
src/autofit/afdummy.c
src/autofit/afglobal.c
src/autofit/afhints.c
src/autofit/afindic.c
src/autofit/aflatin.c
src/autofit/afloader.c
src/autofit/afmodule.c
src/autofit/afranges.c
src/autofit/afshaper.c
src/autofit/afwarp.c
src/base/ftadvanc.c
src/base/ftbbox.c
src/base/ftbdf.c
src/base/ftbitmap.c
src/base/ftcalc.c
src/base/ftcid.c
src/base/ftcolor.c
src/base/ftdbgmem.c
src/base/fterrors.c
src/base/ftfntfmt.c
src/base/ftfstype.c
src/base/ftgasp.c
src/base/ftgloadr.c
src/base/ftglyph.c
src/base/ftgxval.c
src/base/fthash.c
src/base/ftinit.c
src/base/ftlcdfil.c
src/base/ftmac.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/ftpsprop.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/bdf/bdf.c
src/bdf/bdfdrivr.c
src/bdf/bdflib.c
src/bzip2/ftbzip2.c
src/cache/ftcache.c
src/cff/cff.c
src/cid/type1cid.c
src/cache/ftcbasic.c
src/cache/ftccache.c
src/cache/ftccmap.c
src/cache/ftcglyph.c
src/cache/ftcimage.c
src/cache/ftcmanag.c
src/cache/ftcmru.c
src/cache/ftcsbits.c
src/cff/cffcmap.c
src/cff/cffdrivr.c
src/cff/cffgload.c
src/cff/cffload.c
src/cff/cffobjs.c
src/cff/cffparse.c
src/cid/cidgload.c
src/cid/cidload.c
src/cid/cidobjs.c
src/cid/cidparse.c
src/cid/cidriver.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/psnames.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/pcf/pcfdrivr.c
src/pcf/pcfread.c
src/pcf/pcfutil.c
src/pfr/pfrcmap.c
src/pfr/pfrdrivr.c
src/pfr/pfrgload.c
src/pfr/pfrload.c
src/pfr/pfrobjs.c
src/pfr/pfrsbit.c
src/psaux/afmparse.c
src/psaux/cffdecode.c
src/psaux/psarrst.c
src/psaux/psauxmod.c
src/psaux/psblues.c
src/psaux/psconv.c
src/psaux/pserror.c
src/psaux/psfont.c
src/psaux/psft.c
src/psaux/pshints.c
src/psaux/psintrp.c
src/psaux/psobjs.c
src/psaux/psread.c
src/psaux/psstack.c
src/psaux/t1cmap.c
src/psaux/t1decode.c
src/pshinter/pshalgo.c
src/pshinter/pshglob.c
src/pshinter/pshmod.c
src/pshinter/pshrec.c
src/psnames/psmodule.c
src/raster/ftraster.c
src/raster/ftrend1.c
src/sfnt/pngshim.c
src/sfnt/sfdriver.c
src/sfnt/sfobjs.c
src/sfnt/sfwoff.c
src/sfnt/ttbdf.c
src/sfnt/ttcmap.c
src/sfnt/ttcolr.c
src/sfnt/ttcpal.c
src/sfnt/ttkern.c
src/sfnt/ttload.c
src/sfnt/ttmtx.c
src/sfnt/ttpost.c
src/sfnt/ttsbit.c
src/smooth/ftgrays.c
src/smooth/ftsmooth.c
src/truetype/ttdriver.c
src/truetype/ttgload.c
src/truetype/ttgxvar.c
src/truetype/ttinterp.c
src/truetype/ttobjs.c
src/truetype/ttpload.c
src/truetype/ttsubpix.c
src/type1/t1afm.c
src/type1/t1driver.c
src/type1/t1gload.c
src/type1/t1load.c
src/type1/t1objs.c
src/type1/t1parse.c
src/type42/t42drivr.c
src/type42/t42objs.c
src/type42/t42parse.c
src/winfonts/winfnt.c
)
if (UNIX)
list(APPEND BASE_SRCS "builds/unix/ftsystem.c")
else ()
list(APPEND BASE_SRCS "src/base/ftsystem.c")
endif ()
if (WIN32)
enable_language(RC)
list(APPEND BASE_SRCS builds/windows/ftdebug.c
@ -390,8 +499,11 @@ target_include_directories(
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
PRIVATE
${CMAKE_CURRENT_BINARY_DIR}/include
${CMAKE_CURRENT_SOURCE_DIR}/include)
${CMAKE_CURRENT_SOURCE_DIR}/include
# Make <ftconfig.h> available for builds/unix/ftsystem.c.
${CMAKE_CURRENT_BINARY_DIR}/include/freetype/config
)
if (BUILD_FRAMEWORK)
set_property(SOURCE ${PUBLIC_CONFIG_HEADERS}
@ -488,6 +600,13 @@ if (NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL)
COMPONENT pkgconfig)
endif ()
if (UNIX)
install(
FILES ${PROJECT_SOURCE_DIR}/builds/unix/freetype2.m4
DESTINATION ${CMAKE_INSTALL_DATADIR}/aclocal
COMPONENT m4)
endif ()
install(
TARGETS freetype
EXPORT freetype-targets