3 # Copyright (C) 2013-2022 by
4 # David Turner, Robert Wilhelm, and Werner Lemberg.
6 # Written originally by John Cary <cary@txcorp.com>
8 # This file is part of the FreeType project, and may only be used, modified,
9 # and distributed under the terms of the FreeType project license,
10 # LICENSE.TXT. By continuing to use, modify, or distribute this file you
11 # indicate that you have read the license and understand and accept it
15 # The following will (1) create a build directory, and (2) change into it and
16 # call cmake to configure the build with default parameters as a static
19 # https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html
21 # for information about debug or release builds, for example
23 # cmake -B build -D CMAKE_BUILD_TYPE=Release
26 # For a dynamic library, use
28 # cmake -B build -D BUILD_SHARED_LIBS=true -D CMAKE_BUILD_TYPE=Release
30 # For a framework on OS X, use
32 # cmake -E chdir build cmake -G Xcode -D BUILD_FRAMEWORK:BOOL=true ..
34 # For an iOS static library, use
36 # cmake -E chdir build cmake -G Xcode -D IOS_PLATFORM=OS ..
40 # cmake -E chdir build cmake -G Xcode -D IOS_PLATFORM=SIMULATOR ..
44 # cmake -E chdir build cmake -G Xcode -D IOS_PLATFORM=SIMULATOR64 ..
47 # Finally, build the project with
53 # (sudo) cmake --build build --target install
55 # A binary distribution can be made with
57 # cmake --build build --config Release --target package
59 # Please refer to the cmake manual for further options, in particular, how
60 # to modify compilation and linking parameters.
64 # - `cmake' creates configuration files in
66 # <build-directory>/include/freetype/config
68 # which should be further modified if necessary.
70 # - You can use `cmake' directly on a freshly cloned FreeType git
73 # - `CMakeLists.txt' is provided as-is since it is normally not used by the
76 # - Set the `FT_REQUIRE_ZLIB', `FT_REQUIRE_BZIP2', `FT_REQUIRE_PNG',
77 # `FT_REQUIRE_HARFBUZZ', and `FT_REQUIRE_BROTLI' CMake variables to `ON'
78 # or `TRUE' to force using a dependency. Leave a variable undefined
79 # (which is the default) to use the dependency only if it is available.
82 # cmake -B build -D FT_REQUIRE_ZLIB=TRUE \
83 # -D FT_REQUIRE_BZIP2=TRUE \
84 # -D FT_REQUIRE_PNG=TRUE \
85 # -D FT_REQUIRE_HARFBUZZ=TRUE \
86 # -D FT_REQUIRE_BROTLI=TRUE [...]
88 # - Set `FT_DISABLE_XXX=TRUE' to disable a dependency completely (where
89 # `XXX' is a CMake package name like `BZip2'). Example for disabling all
92 # cmake -B build -D FT_DISABLE_ZLIB=TRUE \
93 # -D FT_DISABLE_BZIP2=TRUE \
94 # -D FT_DISABLE_PNG=TRUE \
95 # -D FT_DISABLE_HARFBUZZ=TRUE \
96 # -D FT_DISABLE_BROTLI=TRUE [...]
98 # - NOTE: If a package is set as DISABLED, it cannot be set as REQUIRED
99 # without unsetting the DISABLED value first. For example, if
100 # `FT_DISABLE_HARFBUZZ=TRUE' has been set (Cache is present), you need to
101 # call `FT_DISABLE_HARFBUZZ=FALSE' before calling
102 # `FT_REQUIRE_HARFBUZZ=TRUE'.
104 # - Installation of FreeType can be controlled with the CMake variables
105 # `SKIP_INSTALL_HEADERS', `SKIP_INSTALL_LIBRARIES', and `SKIP_INSTALL_ALL'
106 # (this is compatible with the same CMake variables in zlib's CMake
109 # To minimize the number of cmake_policy() workarounds,
110 # CMake >= 3 is requested.
111 cmake_minimum_required(VERSION 3.0)
113 if (NOT CMAKE_VERSION VERSION_LESS 3.3)
114 # Allow symbol visibility settings also on static libraries. CMake < 3.3
115 # only sets the property on a shared library build.
116 cmake_policy(SET CMP0063 NEW)
118 # Support new IN_LIST if() operator.
119 cmake_policy(SET CMP0057 NEW)
122 include(CheckIncludeFile)
123 include(CMakeDependentOption)
124 include(FindPkgConfig)
126 # CMAKE_TOOLCHAIN_FILE must be set before `project' is called, which
127 # configures the base build environment and references the toolchain file
129 if (DEFINED IOS_PLATFORM)
130 if (NOT "${IOS_PLATFORM}" STREQUAL "OS"
131 AND NOT "${IOS_PLATFORM}" STREQUAL "SIMULATOR"
132 AND NOT "${IOS_PLATFORM}" STREQUAL "SIMULATOR64")
134 "IOS_PLATFORM must be set to either OS, SIMULATOR, or SIMULATOR64")
136 if (NOT "${CMAKE_GENERATOR}" STREQUAL "Xcode")
137 message(AUTHOR_WARNING
138 "You should use Xcode generator with IOS_PLATFORM enabled to get Universal builds.")
140 if (BUILD_SHARED_LIBS)
142 "BUILD_SHARED_LIBS can not be on with IOS_PLATFORM enabled")
146 "BUILD_FRAMEWORK can not be on with IOS_PLATFORM enabled")
149 # iOS only uses static libraries
150 set(BUILD_SHARED_LIBS OFF)
152 set(CMAKE_TOOLCHAIN_FILE
153 ${CMAKE_SOURCE_DIR}/builds/cmake/iOS.cmake)
156 if (DEFINED IOS_PLATFORM)
157 message(FATAL_ERROR "IOS_PLATFORM is not supported on this platform")
164 set(VERSION_MAJOR "2")
165 set(VERSION_MINOR "12")
166 set(VERSION_PATCH "1")
168 # Generate LIBRARY_VERSION and LIBRARY_SOVERSION.
169 set(LIBTOOL_REGEX "version_info='([0-9]+):([0-9]+):([0-9]+)'")
170 file(STRINGS "${PROJECT_SOURCE_DIR}/builds/unix/configure.raw"
172 REGEX ${LIBTOOL_REGEX})
174 ${LIBTOOL_REGEX} "\\1"
175 LIBTOOL_CURRENT "${VERSION_INFO}")
177 ${LIBTOOL_REGEX} "\\2"
178 LIBTOOL_REVISION "${VERSION_INFO}")
180 ${LIBTOOL_REGEX} "\\3"
181 LIBTOOL_AGE "${VERSION_INFO}")
183 # This is what libtool does internally on Unix platforms.
184 math(EXPR LIBRARY_SOVERSION "${LIBTOOL_CURRENT} - ${LIBTOOL_AGE}")
185 set(LIBRARY_VERSION "${LIBRARY_SOVERSION}.${LIBTOOL_AGE}.${LIBTOOL_REVISION}")
187 # External dependency library detection is automatic. See the notes at the
188 # top of this file, for how to force or disable dependencies completely.
189 option(FT_DISABLE_ZLIB
190 "Disable use of system zlib and use internal zlib library instead." OFF)
191 cmake_dependent_option(FT_REQUIRE_ZLIB
192 "Require system zlib instead of internal zlib library." OFF
193 "NOT FT_DISABLE_ZLIB" OFF)
195 option(FT_DISABLE_BZIP2
196 "Disable support of bzip2 compressed fonts." OFF)
197 cmake_dependent_option(FT_REQUIRE_BZIP2
198 "Require support of bzip2 compressed fonts." OFF
199 "NOT FT_DISABLE_BZIP2" OFF)
201 option(FT_DISABLE_PNG
202 "Disable support of PNG compressed OpenType embedded bitmaps." OFF)
203 cmake_dependent_option(FT_REQUIRE_PNG
204 "Require support of PNG compressed OpenType embedded bitmaps." OFF
205 "NOT FT_DISABLE_PNG" OFF)
207 option(FT_DISABLE_HARFBUZZ
208 "Disable HarfBuzz (used for improving auto-hinting of OpenType fonts)." OFF)
209 cmake_dependent_option(FT_REQUIRE_HARFBUZZ
210 "Require HarfBuzz for improving auto-hinting of OpenType fonts." OFF
211 "NOT FT_DISABLE_HARFBUZZ" OFF)
213 option(FT_DISABLE_BROTLI
214 "Disable support of compressed WOFF2 fonts." OFF)
215 cmake_dependent_option(FT_REQUIRE_BROTLI
216 "Require support of compressed WOFF2 fonts." OFF
217 "NOT FT_DISABLE_BROTLI" OFF)
220 # Disallow in-source builds
221 if ("${CMAKE_BINARY_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}")
223 "In-source builds are not permitted! Make a separate folder for"
225 " cmake -E make_directory build\n"
226 " cmake -E chdir build cmake ..\n"
227 "Before that, remove the files created by this failed run with\n"
228 " cmake -E remove CMakeCache.txt\n"
229 " cmake -E remove_directory CMakeFiles")
233 # Add local cmake modules
234 list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/builds/cmake)
238 if (NOT "${CMAKE_GENERATOR}" STREQUAL "Xcode")
240 "You should use Xcode generator with BUILD_FRAMEWORK enabled")
242 set(CMAKE_OSX_ARCHITECTURES "$(ARCHS_STANDARD)")
243 set(BUILD_SHARED_LIBS ON)
248 if (NOT FT_DISABLE_HARFBUZZ)
249 set(HARFBUZZ_MIN_VERSION "2.0.0")
250 if (FT_REQUIRE_HARFBUZZ)
251 find_package(HarfBuzz ${HARFBUZZ_MIN_VERSION} REQUIRED)
253 find_package(HarfBuzz ${HARFBUZZ_MIN_VERSION})
257 if (NOT FT_DISABLE_PNG)
259 find_package(PNG REQUIRED)
265 if (NOT FT_DISABLE_ZLIB)
267 find_package(ZLIB REQUIRED)
273 if (NOT FT_DISABLE_BZIP2)
274 # Genuine BZip2 does not provide bzip2.pc, but some platforms have it.
275 # For better dependency in freetype2.pc, bzip2.pc is searched
276 # regardless of the availability of libbz2. If bzip2.pc is found,
277 # Requires.private is used instead of Libs.private.
278 if (FT_REQUIRE_BZIP2)
279 find_package(BZip2 REQUIRED)
283 pkg_check_modules(PC_BZIP2 bzip2)
286 if (NOT FT_DISABLE_BROTLI)
287 if (FT_REQUIRE_BROTLI)
288 find_package(BrotliDec REQUIRED)
290 find_package(BrotliDec)
294 # Create the configuration file
296 check_include_file("unistd.h" HAVE_UNISTD_H)
297 check_include_file("fcntl.h" HAVE_FCNTL_H)
299 file(READ "${PROJECT_SOURCE_DIR}/builds/unix/ftconfig.h.in"
303 "#undef +(HAVE_UNISTD_H)" "#define \\1 1"
304 FTCONFIG_H "${FTCONFIG_H}")
308 "#undef +(HAVE_FCNTL_H)" "#define \\1 1"
309 FTCONFIG_H "${FTCONFIG_H}")
312 file(READ "${PROJECT_SOURCE_DIR}/include/freetype/config/ftconfig.h"
316 set(FTCONFIG_H_NAME "${PROJECT_BINARY_DIR}/include/freetype/config/ftconfig.h")
317 if (EXISTS "${FTCONFIG_H_NAME}")
318 file(READ "${FTCONFIG_H_NAME}" ORIGINAL_FTCONFIG_H)
320 set(ORIGINAL_FTCONFIG_H "")
322 if (NOT (ORIGINAL_FTCONFIG_H STREQUAL FTCONFIG_H))
323 file(WRITE "${FTCONFIG_H_NAME}" "${FTCONFIG_H}")
327 # Create the options file
328 file(READ "${PROJECT_SOURCE_DIR}/include/freetype/config/ftoption.h"
332 "/\\* +(#define +FT_CONFIG_OPTION_SYSTEM_ZLIB) +\\*/" "\\1"
333 FTOPTION_H "${FTOPTION_H}")
337 "/\\* +(#define +FT_CONFIG_OPTION_USE_BZIP2) +\\*/" "\\1"
338 FTOPTION_H "${FTOPTION_H}")
342 "/\\* +(#define +FT_CONFIG_OPTION_USE_PNG) +\\*/" "\\1"
343 FTOPTION_H "${FTOPTION_H}")
347 "/\\* +(#define +FT_CONFIG_OPTION_USE_HARFBUZZ) +\\*/" "\\1"
348 FTOPTION_H "${FTOPTION_H}")
352 "/\\* +(#define +FT_CONFIG_OPTION_USE_BROTLI) +\\*/" "\\1"
353 FTOPTION_H "${FTOPTION_H}")
356 set(FTOPTION_H_NAME "${PROJECT_BINARY_DIR}/include/freetype/config/ftoption.h")
357 if (EXISTS "${FTOPTION_H_NAME}")
358 file(READ "${FTOPTION_H_NAME}" ORIGINAL_FTOPTION_H)
360 set(ORIGINAL_FTOPTION_H "")
362 if (NOT (ORIGINAL_FTOPTION_H STREQUAL FTOPTION_H))
363 file(WRITE "${FTOPTION_H_NAME}" "${FTOPTION_H}")
367 file(GLOB PUBLIC_HEADERS "include/ft2build.h" "include/freetype/*.h")
368 file(GLOB PUBLIC_CONFIG_HEADERS "include/freetype/config/*.h")
369 file(GLOB PRIVATE_HEADERS "include/freetype/internal/*.h")
373 src/autofit/autofit.c
402 src/pshinter/pshinter.c
403 src/psnames/psnames.c
409 src/truetype/truetype.c
412 src/winfonts/winfnt.c
416 list(APPEND BASE_SRCS "builds/unix/ftsystem.c")
418 list(APPEND BASE_SRCS "builds/windows/ftsystem.c")
420 list(APPEND BASE_SRCS "src/base/ftsystem.c")
425 list(APPEND BASE_SRCS builds/windows/ftdebug.c
428 list(APPEND BASE_SRCS builds/wince/ftdebug.c)
430 list(APPEND BASE_SRCS src/base/ftdebug.c)
434 list(APPEND BASE_SRCS builds/mac/freetype-Info.plist)
438 if (NOT DISABLE_FORCE_DEBUG_POSTFIX)
439 set(CMAKE_DEBUG_POSTFIX d)
445 ${PUBLIC_CONFIG_HEADERS}
450 set_target_properties(
452 C_VISIBILITY_PRESET hidden)
454 target_compile_definitions(
455 freetype PRIVATE FT2_BUILD_LIBRARY)
458 target_compile_definitions(
459 freetype PRIVATE _CRT_SECURE_NO_WARNINGS _CRT_NONSTDC_NO_WARNINGS)
460 if (BUILD_SHARED_LIBS)
461 target_compile_definitions(
462 freetype PRIVATE DLL_EXPORT)
466 if (BUILD_SHARED_LIBS)
467 set_target_properties(freetype PROPERTIES
468 VERSION ${LIBRARY_VERSION}
469 SOVERSION ${LIBRARY_SOVERSION})
472 # Pick up ftconfig.h and ftoption.h generated above, first.
473 target_include_directories(
476 $<INSTALL_INTERFACE:include/freetype2>
477 $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/include>
478 $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
480 ${CMAKE_CURRENT_BINARY_DIR}/include
481 ${CMAKE_CURRENT_SOURCE_DIR}/include
483 # Make <ftconfig.h> available for builds/unix/ftsystem.c.
484 ${CMAKE_CURRENT_BINARY_DIR}/include/freetype/config
489 set_property(SOURCE ${PUBLIC_CONFIG_HEADERS}
490 PROPERTY MACOSX_PACKAGE_LOCATION Headers/config
492 set_target_properties(freetype PROPERTIES
494 MACOSX_FRAMEWORK_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/builds/mac/freetype-Info.plist
495 PUBLIC_HEADER "${PUBLIC_HEADERS}"
496 XCODE_ATTRIBUTE_INSTALL_PATH "@rpath"
501 set(PKGCONFIG_REQUIRES "")
502 set(PKGCONFIG_REQUIRES_PRIVATE "")
503 set(PKGCONFIG_LIBS "-L\${libdir} -lfreetype")
504 set(PKGCONFIG_LIBS_PRIVATE "")
507 target_link_libraries(freetype PRIVATE ${ZLIB_LIBRARIES})
508 target_include_directories(freetype PRIVATE ${ZLIB_INCLUDE_DIRS})
509 list(APPEND PKGCONFIG_REQUIRES_PRIVATE "zlib")
512 target_link_libraries(freetype PRIVATE ${BZIP2_LIBRARIES})
513 target_include_directories(freetype PRIVATE ${BZIP2_INCLUDE_DIR}) # not BZIP2_INCLUDE_DIRS
515 list(APPEND PKGCONFIG_REQUIRES_PRIVATE "bzip2")
517 list(APPEND PKGCONFIG_LIBS_PRIVATE "-lbz2")
521 target_link_libraries(freetype PRIVATE ${PNG_LIBRARIES})
522 target_compile_definitions(freetype PRIVATE ${PNG_DEFINITIONS})
523 target_include_directories(freetype PRIVATE ${PNG_INCLUDE_DIRS})
524 list(APPEND PKGCONFIG_REQUIRES_PRIVATE "libpng")
527 target_link_libraries(freetype PRIVATE ${HarfBuzz_LIBRARY})
528 target_include_directories(freetype PRIVATE ${HarfBuzz_INCLUDE_DIRS})
529 list(APPEND PKGCONFIG_REQUIRES_PRIVATE "harfbuzz >= ${HARFBUZZ_MIN_VERSION}")
532 target_link_libraries(freetype PRIVATE ${BROTLIDEC_LIBRARIES})
533 target_compile_definitions(freetype PRIVATE ${BROTLIDEC_DEFINITIONS})
534 target_include_directories(freetype PRIVATE ${BROTLIDEC_INCLUDE_DIRS})
535 list(APPEND PKGCONFIG_REQUIRES_PRIVATE "libbrotlidec")
540 include(GNUInstallDirs)
542 if (NOT SKIP_INSTALL_HEADERS AND NOT SKIP_INSTALL_ALL)
544 # Note the trailing slash in the argument to `DIRECTORY'!
545 DIRECTORY ${PROJECT_SOURCE_DIR}/include/
546 DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/freetype2
548 PATTERN "internal" EXCLUDE
549 PATTERN "ftconfig.h" EXCLUDE
550 PATTERN "ftoption.h" EXCLUDE)
552 FILES ${PROJECT_BINARY_DIR}/include/freetype/config/ftconfig.h
553 ${PROJECT_BINARY_DIR}/include/freetype/config/ftoption.h
554 DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/freetype2/freetype/config
558 if (NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL)
559 # Generate the pkg-config file
560 file(READ "${PROJECT_SOURCE_DIR}/builds/unix/freetype2.in" FREETYPE2_PC_IN)
562 string(REPLACE ";" ", " PKGCONFIG_REQUIRES_PRIVATE "${PKGCONFIG_REQUIRES_PRIVATE}")
564 string(REPLACE "%prefix%" ${CMAKE_INSTALL_PREFIX}
565 FREETYPE2_PC_IN ${FREETYPE2_PC_IN})
566 string(REPLACE "%exec_prefix%" "\${prefix}"
567 FREETYPE2_PC_IN ${FREETYPE2_PC_IN})
568 string(REPLACE "%libdir%" "\${prefix}/${CMAKE_INSTALL_LIBDIR}"
569 FREETYPE2_PC_IN ${FREETYPE2_PC_IN})
570 string(REPLACE "%includedir%" "\${prefix}/${CMAKE_INSTALL_INCLUDEDIR}"
571 FREETYPE2_PC_IN ${FREETYPE2_PC_IN})
572 string(REPLACE "%ft_version%" "${LIBTOOL_CURRENT}.${LIBTOOL_REVISION}.${LIBTOOL_AGE}"
573 FREETYPE2_PC_IN ${FREETYPE2_PC_IN})
575 if (BUILD_SHARED_LIBS)
576 string(REPLACE "%PKGCONFIG_REQUIRES%" "${PKGCONFIG_REQUIRES}"
577 FREETYPE2_PC_IN ${FREETYPE2_PC_IN})
578 string(REPLACE "%PKGCONFIG_REQUIRES_PRIVATE%" "${PKGCONFIG_REQUIRES_PRIVATE}"
579 FREETYPE2_PC_IN ${FREETYPE2_PC_IN})
580 string(REPLACE "%PKGCONFIG_LIBS%" "${PKGCONFIG_LIBS}"
581 FREETYPE2_PC_IN ${FREETYPE2_PC_IN})
582 string(REPLACE "%PKGCONFIG_LIBS_PRIVATE%" "${PKGCONFIG_LIBS_PRIVATE}"
583 FREETYPE2_PC_IN ${FREETYPE2_PC_IN})
585 string(REPLACE "%PKGCONFIG_REQUIRES%" "${PKGCONFIG_REQUIRES} ${PKGCONFIG_REQUIRES_PRIVATE}"
586 FREETYPE2_PC_IN ${FREETYPE2_PC_IN})
587 string(REPLACE "%PKGCONFIG_REQUIRES_PRIVATE%" ""
588 FREETYPE2_PC_IN ${FREETYPE2_PC_IN})
589 string(REPLACE "%PKGCONFIG_LIBS%" "${PKGCONFIG_LIBS} ${PKGCONFIG_LIBS_PRIVATE}"
590 FREETYPE2_PC_IN ${FREETYPE2_PC_IN})
591 string(REPLACE "%PKGCONFIG_LIBS_PRIVATE%" ""
592 FREETYPE2_PC_IN ${FREETYPE2_PC_IN})
595 set(FREETYPE2_PC_IN_NAME "${PROJECT_BINARY_DIR}/freetype2.pc")
596 if (EXISTS "${FREETYPE2_PC_IN_NAME}")
597 file(READ "${FREETYPE2_PC_IN_NAME}" ORIGINAL_FREETYPE2_PC_IN)
599 set(ORIGINAL_FREETYPE2_PC_IN "")
601 if (NOT (ORIGINAL_FREETYPE2_PC_IN STREQUAL FREETYPE2_PC_IN))
602 file(WRITE "${FREETYPE2_PC_IN_NAME}" ${FREETYPE2_PC_IN})
606 FILES ${PROJECT_BINARY_DIR}/freetype2.pc
607 DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig
610 include(CMakePackageConfigHelpers)
611 write_basic_package_version_file(
612 ${PROJECT_BINARY_DIR}/freetype-config-version.cmake
613 VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}
614 COMPATIBILITY SameMajorVersion)
618 EXPORT freetype-targets
619 LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
620 ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
621 RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
622 FRAMEWORK DESTINATION Library/Frameworks
625 EXPORT freetype-targets
626 DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/freetype
627 FILE freetype-config.cmake
630 FILES ${PROJECT_BINARY_DIR}/freetype-config-version.cmake
631 DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/freetype
637 set(CPACK_PACKAGE_NAME ${CMAKE_PROJECT_NAME})
638 set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "The FreeType font rendering library.")
639 set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README")
640 set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE.TXT")
642 set(CPACK_PACKAGE_VERSION_MAJOR ${VERSION_MAJOR})
643 set(CPACK_PACKAGE_VERSION_MINOR ${VERSION_MINOR})
644 set(CPACK_PACKAGE_VERSION_PATCH ${VERSION_PATCH})
645 set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
648 set(CPACK_GENERATOR ZIP)
650 set(CPACK_GENERATOR TGZ)
653 set(CPACK_COMPONENT_LIBRARIES_DISPLAY_NAME "Libraries")
654 set(CPACK_COMPONENT_HEADERS_DISPLAY_NAME "C/C++ Headers")
655 set(CPACK_COMPONENT_LIBRARIES_DESCRIPTION
656 "Library used to build programs which use FreeType")
657 set(CPACK_COMPONENT_HEADERS_DESCRIPTION
658 "C/C++ header files for use with FreeType")
659 set(CPACK_COMPONENT_HEADERS_DEPENDS libraries)
660 set(CPACK_COMPONENT_LIBRARIES_GROUP "Development")
661 set(CPACK_COMPONENT_HEADERS_GROUP "Development")