3 # Copyright (C) 2013-2023 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 # - Say `cmake -LAH` to see all configuration options.
66 # - `cmake' creates configuration files in
68 # <build-directory>/include/freetype/config
70 # which should be further modified if necessary.
72 # - You can use `cmake' directly on a freshly cloned FreeType git
75 # - `CMakeLists.txt' is provided as-is since it is normally not used by the
78 # - Set the `FT_REQUIRE_ZLIB', `FT_REQUIRE_BZIP2', `FT_REQUIRE_PNG',
79 # `FT_REQUIRE_HARFBUZZ', and `FT_REQUIRE_BROTLI' CMake variables to `ON'
80 # or `TRUE' to force using a dependency. Leave a variable undefined
81 # (which is the default) to use the dependency only if it is available.
84 # cmake -B build -D FT_REQUIRE_ZLIB=TRUE \
85 # -D FT_REQUIRE_BZIP2=TRUE \
86 # -D FT_REQUIRE_PNG=TRUE \
87 # -D FT_REQUIRE_HARFBUZZ=TRUE \
88 # -D FT_REQUIRE_BROTLI=TRUE [...]
90 # - Set `FT_DISABLE_XXX=TRUE' to disable a dependency completely (where
91 # `XXX' is a CMake package name like `BZip2'). Example for disabling all
94 # cmake -B build -D FT_DISABLE_ZLIB=TRUE \
95 # -D FT_DISABLE_BZIP2=TRUE \
96 # -D FT_DISABLE_PNG=TRUE \
97 # -D FT_DISABLE_HARFBUZZ=TRUE \
98 # -D FT_DISABLE_BROTLI=TRUE [...]
100 # - NOTE: If a package is set as DISABLED, it cannot be set as REQUIRED
101 # without unsetting the DISABLED value first. For example, if
102 # `FT_DISABLE_HARFBUZZ=TRUE' has been set (Cache is present), you need to
103 # call `FT_DISABLE_HARFBUZZ=FALSE' before calling
104 # `FT_REQUIRE_HARFBUZZ=TRUE'.
106 # - Installation of FreeType can be controlled with the CMake variables
107 # `SKIP_INSTALL_HEADERS', `SKIP_INSTALL_LIBRARIES', and `SKIP_INSTALL_ALL'
108 # (this is compatible with the same CMake variables in zlib's CMake
111 # To minimize the number of cmake_policy() workarounds,
112 # CMake >= 3 is requested.
113 cmake_minimum_required(VERSION 3.0)
115 if (NOT CMAKE_VERSION VERSION_LESS 3.3)
116 # Allow symbol visibility settings also on static libraries. CMake < 3.3
117 # only sets the property on a shared library build.
118 cmake_policy(SET CMP0063 NEW)
120 # Support new IN_LIST if() operator.
121 cmake_policy(SET CMP0057 NEW)
124 include(CheckIncludeFile)
125 include(CMakeDependentOption)
127 # CMAKE_TOOLCHAIN_FILE must be set before `project' is called, which
128 # configures the base build environment and references the toolchain file
130 if (DEFINED IOS_PLATFORM)
131 if (NOT "${IOS_PLATFORM}" STREQUAL "OS"
132 AND NOT "${IOS_PLATFORM}" STREQUAL "SIMULATOR"
133 AND NOT "${IOS_PLATFORM}" STREQUAL "SIMULATOR64")
135 "IOS_PLATFORM must be set to either OS, SIMULATOR, or SIMULATOR64")
137 if (NOT "${CMAKE_GENERATOR}" STREQUAL "Xcode")
138 message(AUTHOR_WARNING
139 "You should use Xcode generator with IOS_PLATFORM enabled to get Universal builds.")
141 if (BUILD_SHARED_LIBS)
143 "BUILD_SHARED_LIBS can not be on with IOS_PLATFORM enabled")
147 "BUILD_FRAMEWORK can not be on with IOS_PLATFORM enabled")
150 # iOS only uses static libraries
151 set(BUILD_SHARED_LIBS OFF)
153 set(CMAKE_TOOLCHAIN_FILE
154 ${CMAKE_SOURCE_DIR}/builds/cmake/iOS.cmake)
157 if (DEFINED IOS_PLATFORM)
158 message(FATAL_ERROR "IOS_PLATFORM is not supported on this platform")
165 set(VERSION_MAJOR "2")
166 set(VERSION_MINOR "13")
167 set(VERSION_PATCH "2")
169 # Generate LIBRARY_VERSION and LIBRARY_SOVERSION.
170 set(LIBTOOL_REGEX "version_info='([0-9]+):([0-9]+):([0-9]+)'")
171 file(STRINGS "${PROJECT_SOURCE_DIR}/builds/unix/configure.raw"
173 REGEX ${LIBTOOL_REGEX})
175 ${LIBTOOL_REGEX} "\\1"
176 LIBTOOL_CURRENT "${VERSION_INFO}")
178 ${LIBTOOL_REGEX} "\\2"
179 LIBTOOL_REVISION "${VERSION_INFO}")
181 ${LIBTOOL_REGEX} "\\3"
182 LIBTOOL_AGE "${VERSION_INFO}")
184 # This is what libtool does internally on Unix platforms.
185 math(EXPR LIBRARY_SOVERSION "${LIBTOOL_CURRENT} - ${LIBTOOL_AGE}")
186 set(LIBRARY_VERSION "${LIBRARY_SOVERSION}.${LIBTOOL_AGE}.${LIBTOOL_REVISION}")
188 # External dependency library detection is automatic. See the notes at the
189 # top of this file, for how to force or disable dependencies completely.
190 option(FT_DISABLE_ZLIB
191 "Disable use of system zlib and use internal zlib library instead." OFF)
192 cmake_dependent_option(FT_REQUIRE_ZLIB
193 "Require system zlib instead of internal zlib library." OFF
194 "NOT FT_DISABLE_ZLIB" OFF)
196 option(FT_DISABLE_BZIP2
197 "Disable support of bzip2 compressed fonts." OFF)
198 cmake_dependent_option(FT_REQUIRE_BZIP2
199 "Require support of bzip2 compressed fonts." OFF
200 "NOT FT_DISABLE_BZIP2" OFF)
202 option(FT_DISABLE_PNG
203 "Disable support of PNG compressed OpenType embedded bitmaps." OFF)
204 cmake_dependent_option(FT_REQUIRE_PNG
205 "Require support of PNG compressed OpenType embedded bitmaps." OFF
206 "NOT FT_DISABLE_PNG" OFF)
208 option(FT_DISABLE_HARFBUZZ
209 "Disable HarfBuzz (used for improving auto-hinting of OpenType fonts)." OFF)
210 cmake_dependent_option(FT_REQUIRE_HARFBUZZ
211 "Require HarfBuzz for improving auto-hinting of OpenType fonts." OFF
212 "NOT FT_DISABLE_HARFBUZZ" OFF)
214 option(FT_DISABLE_BROTLI
215 "Disable support of compressed WOFF2 fonts." OFF)
216 cmake_dependent_option(FT_REQUIRE_BROTLI
217 "Require support of compressed WOFF2 fonts." OFF
218 "NOT FT_DISABLE_BROTLI" OFF)
220 option(FT_ENABLE_ERROR_STRINGS
221 "Enable support for meaningful error descriptions." OFF)
223 # Disallow in-source builds
224 if ("${CMAKE_BINARY_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}")
226 "In-source builds are not permitted! Make a separate folder for"
228 " cmake -E make_directory build\n"
229 " cmake -E chdir build cmake ..\n"
230 "Before that, remove the files created by this failed run with\n"
231 " cmake -E remove CMakeCache.txt\n"
232 " cmake -E remove_directory CMakeFiles")
236 # Add local cmake modules
237 list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/builds/cmake)
241 if (NOT "${CMAKE_GENERATOR}" STREQUAL "Xcode")
243 "You should use Xcode generator with BUILD_FRAMEWORK enabled")
245 set(CMAKE_OSX_ARCHITECTURES "$(ARCHS_STANDARD)")
246 set(BUILD_SHARED_LIBS ON)
251 include(FindPkgConfig)
253 if (NOT FT_DISABLE_HARFBUZZ)
254 set(HARFBUZZ_MIN_VERSION "2.0.0")
255 if (FT_REQUIRE_HARFBUZZ)
256 find_package(HarfBuzz ${HARFBUZZ_MIN_VERSION} REQUIRED)
258 find_package(HarfBuzz ${HARFBUZZ_MIN_VERSION})
262 if (NOT FT_DISABLE_PNG)
264 find_package(PNG REQUIRED)
270 if (NOT FT_DISABLE_ZLIB)
272 find_package(ZLIB REQUIRED)
278 if (NOT FT_DISABLE_BZIP2)
279 # Genuine BZip2 does not provide bzip2.pc, but some platforms have it.
280 # For better dependency in freetype2.pc, bzip2.pc is searched
281 # regardless of the availability of libbz2. If bzip2.pc is found,
282 # Requires.private is used instead of Libs.private.
283 if (FT_REQUIRE_BZIP2)
284 find_package(BZip2 REQUIRED)
288 pkg_check_modules(PC_BZIP2 bzip2)
291 if (NOT FT_DISABLE_BROTLI)
292 if (FT_REQUIRE_BROTLI)
293 find_package(BrotliDec REQUIRED)
295 find_package(BrotliDec)
299 # Create the configuration file
301 check_include_file("unistd.h" HAVE_UNISTD_H)
302 check_include_file("fcntl.h" HAVE_FCNTL_H)
304 file(READ "${PROJECT_SOURCE_DIR}/builds/unix/ftconfig.h.in"
308 "#undef +(HAVE_UNISTD_H)" "#define \\1 1"
309 FTCONFIG_H "${FTCONFIG_H}")
313 "#undef +(HAVE_FCNTL_H)" "#define \\1 1"
314 FTCONFIG_H "${FTCONFIG_H}")
317 file(READ "${PROJECT_SOURCE_DIR}/include/freetype/config/ftconfig.h"
321 set(FTCONFIG_H_NAME "${PROJECT_BINARY_DIR}/include/freetype/config/ftconfig.h")
322 if (EXISTS "${FTCONFIG_H_NAME}")
323 file(READ "${FTCONFIG_H_NAME}" ORIGINAL_FTCONFIG_H)
325 set(ORIGINAL_FTCONFIG_H "")
327 if (NOT (ORIGINAL_FTCONFIG_H STREQUAL FTCONFIG_H))
328 file(WRITE "${FTCONFIG_H_NAME}" "${FTCONFIG_H}")
332 # Create the options file
333 file(READ "${PROJECT_SOURCE_DIR}/include/freetype/config/ftoption.h"
337 "/\\* +(#define +FT_CONFIG_OPTION_SYSTEM_ZLIB) +\\*/" "\\1"
338 FTOPTION_H "${FTOPTION_H}")
342 "/\\* +(#define +FT_CONFIG_OPTION_USE_BZIP2) +\\*/" "\\1"
343 FTOPTION_H "${FTOPTION_H}")
347 "/\\* +(#define +FT_CONFIG_OPTION_USE_PNG) +\\*/" "\\1"
348 FTOPTION_H "${FTOPTION_H}")
352 "/\\* +(#define +FT_CONFIG_OPTION_USE_HARFBUZZ) +\\*/" "\\1"
353 FTOPTION_H "${FTOPTION_H}")
357 "/\\* +(#define +FT_CONFIG_OPTION_USE_BROTLI) +\\*/" "\\1"
358 FTOPTION_H "${FTOPTION_H}")
361 if (FT_ENABLE_ERROR_STRINGS)
363 "/\\* +(#define +FT_CONFIG_OPTION_ERROR_STRINGS) +\\*/" "\\1"
364 FTOPTION_H "${FTOPTION_H}")
367 set(FTOPTION_H_NAME "${PROJECT_BINARY_DIR}/include/freetype/config/ftoption.h")
368 if (EXISTS "${FTOPTION_H_NAME}")
369 file(READ "${FTOPTION_H_NAME}" ORIGINAL_FTOPTION_H)
371 set(ORIGINAL_FTOPTION_H "")
373 if (NOT (ORIGINAL_FTOPTION_H STREQUAL FTOPTION_H))
374 file(WRITE "${FTOPTION_H_NAME}" "${FTOPTION_H}")
378 file(GLOB PUBLIC_HEADERS "include/ft2build.h" "include/freetype/*.h")
379 file(GLOB PUBLIC_CONFIG_HEADERS "include/freetype/config/*.h")
380 file(GLOB PRIVATE_HEADERS "include/freetype/internal/*.h")
384 src/autofit/autofit.c
413 src/pshinter/pshinter.c
414 src/psnames/psnames.c
420 src/truetype/truetype.c
423 src/winfonts/winfnt.c
427 list(APPEND BASE_SRCS "builds/unix/ftsystem.c")
429 list(APPEND BASE_SRCS "builds/windows/ftsystem.c")
431 list(APPEND BASE_SRCS "src/base/ftsystem.c")
436 list(APPEND BASE_SRCS builds/windows/ftdebug.c
439 list(APPEND BASE_SRCS builds/wince/ftdebug.c)
441 list(APPEND BASE_SRCS src/base/ftdebug.c)
445 list(APPEND BASE_SRCS builds/mac/freetype-Info.plist)
449 if (NOT DISABLE_FORCE_DEBUG_POSTFIX)
450 set(CMAKE_DEBUG_POSTFIX d)
456 ${PUBLIC_CONFIG_HEADERS}
461 set_target_properties(
463 C_VISIBILITY_PRESET hidden)
465 target_compile_definitions(
466 freetype PRIVATE FT2_BUILD_LIBRARY)
469 target_compile_definitions(
470 freetype PRIVATE _CRT_SECURE_NO_WARNINGS _CRT_NONSTDC_NO_WARNINGS)
471 if (BUILD_SHARED_LIBS)
472 target_compile_definitions(
473 freetype PRIVATE DLL_EXPORT)
477 if (BUILD_SHARED_LIBS)
478 set_target_properties(freetype PROPERTIES
479 VERSION ${LIBRARY_VERSION}
480 SOVERSION ${LIBRARY_SOVERSION})
483 # Pick up ftconfig.h and ftoption.h generated above, first.
484 target_include_directories(
487 $<INSTALL_INTERFACE:include/freetype2>
488 $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/include>
489 $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
491 ${CMAKE_CURRENT_BINARY_DIR}/include
492 ${CMAKE_CURRENT_SOURCE_DIR}/include
494 # Make <ftconfig.h> available for builds/unix/ftsystem.c.
495 ${CMAKE_CURRENT_BINARY_DIR}/include/freetype/config
500 set_property(SOURCE ${PUBLIC_CONFIG_HEADERS}
501 PROPERTY MACOSX_PACKAGE_LOCATION Headers/config
503 set_target_properties(freetype PROPERTIES
505 MACOSX_FRAMEWORK_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/builds/mac/freetype-Info.plist
506 PUBLIC_HEADER "${PUBLIC_HEADERS}"
507 XCODE_ATTRIBUTE_INSTALL_PATH "@rpath"
511 # 'freetype-interface' is an interface library, to be accessed with
512 # `EXPORT_NAME Freetype::Freetype`. This is the target name provided by
513 # CMake's `FindFreetype.cmake`, so we provide it for compatibility.
514 add_library(freetype-interface INTERFACE)
515 set_target_properties(freetype-interface PROPERTIES
516 EXPORT_NAME Freetype::Freetype
517 INTERFACE_LINK_LIBRARIES freetype)
519 set(PKGCONFIG_REQUIRES "")
520 set(PKGCONFIG_REQUIRES_PRIVATE "")
521 set(PKGCONFIG_LIBS "-L\${libdir} -lfreetype")
522 set(PKGCONFIG_LIBS_PRIVATE "")
525 target_link_libraries(freetype PRIVATE ${ZLIB_LIBRARIES})
526 target_include_directories(freetype PRIVATE ${ZLIB_INCLUDE_DIRS})
527 list(APPEND PKGCONFIG_REQUIRES_PRIVATE "zlib")
530 target_link_libraries(freetype PRIVATE ${BZIP2_LIBRARIES})
531 target_include_directories(freetype PRIVATE ${BZIP2_INCLUDE_DIR}) # not BZIP2_INCLUDE_DIRS
533 list(APPEND PKGCONFIG_REQUIRES_PRIVATE "bzip2")
535 list(APPEND PKGCONFIG_LIBS_PRIVATE "-lbz2")
539 target_link_libraries(freetype PRIVATE ${PNG_LIBRARIES})
540 target_compile_definitions(freetype PRIVATE ${PNG_DEFINITIONS})
541 target_include_directories(freetype PRIVATE ${PNG_INCLUDE_DIRS})
542 list(APPEND PKGCONFIG_REQUIRES_PRIVATE "libpng")
545 target_link_libraries(freetype PRIVATE ${HarfBuzz_LIBRARY})
546 target_include_directories(freetype PRIVATE ${HarfBuzz_INCLUDE_DIRS})
547 list(APPEND PKGCONFIG_REQUIRES_PRIVATE "harfbuzz >= ${HARFBUZZ_MIN_VERSION}")
550 target_link_libraries(freetype PRIVATE ${BROTLIDEC_LIBRARIES})
551 target_compile_definitions(freetype PRIVATE ${BROTLIDEC_DEFINITIONS})
552 target_include_directories(freetype PRIVATE ${BROTLIDEC_INCLUDE_DIRS})
553 list(APPEND PKGCONFIG_REQUIRES_PRIVATE "libbrotlidec")
558 include(GNUInstallDirs)
560 if (NOT SKIP_INSTALL_HEADERS AND NOT SKIP_INSTALL_ALL)
562 # Note the trailing slash in the argument to `DIRECTORY'!
563 DIRECTORY ${PROJECT_SOURCE_DIR}/include/
564 DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/freetype2
566 PATTERN "internal" EXCLUDE
567 PATTERN "ftconfig.h" EXCLUDE
568 PATTERN "ftoption.h" EXCLUDE)
570 FILES ${PROJECT_BINARY_DIR}/include/freetype/config/ftconfig.h
571 ${PROJECT_BINARY_DIR}/include/freetype/config/ftoption.h
572 DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/freetype2/freetype/config
576 if (NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL)
577 # Generate the pkg-config file
578 file(READ "${PROJECT_SOURCE_DIR}/builds/unix/freetype2.in" FREETYPE2_PC_IN)
580 string(REPLACE ";" ", " PKGCONFIG_REQUIRES_PRIVATE "${PKGCONFIG_REQUIRES_PRIVATE}")
582 string(REPLACE "%prefix%" ${CMAKE_INSTALL_PREFIX}
583 FREETYPE2_PC_IN ${FREETYPE2_PC_IN})
584 string(REPLACE "%exec_prefix%" "\${prefix}"
585 FREETYPE2_PC_IN ${FREETYPE2_PC_IN})
586 string(REPLACE "%libdir%" "\${prefix}/${CMAKE_INSTALL_LIBDIR}"
587 FREETYPE2_PC_IN ${FREETYPE2_PC_IN})
588 string(REPLACE "%includedir%" "\${prefix}/${CMAKE_INSTALL_INCLUDEDIR}"
589 FREETYPE2_PC_IN ${FREETYPE2_PC_IN})
590 string(REPLACE "%ft_version%" "${LIBTOOL_CURRENT}.${LIBTOOL_REVISION}.${LIBTOOL_AGE}"
591 FREETYPE2_PC_IN ${FREETYPE2_PC_IN})
593 if (BUILD_SHARED_LIBS)
594 string(REPLACE "%PKGCONFIG_REQUIRES%" "${PKGCONFIG_REQUIRES}"
595 FREETYPE2_PC_IN ${FREETYPE2_PC_IN})
596 string(REPLACE "%PKGCONFIG_REQUIRES_PRIVATE%" "${PKGCONFIG_REQUIRES_PRIVATE}"
597 FREETYPE2_PC_IN ${FREETYPE2_PC_IN})
598 string(REPLACE "%PKGCONFIG_LIBS%" "${PKGCONFIG_LIBS}"
599 FREETYPE2_PC_IN ${FREETYPE2_PC_IN})
600 string(REPLACE "%PKGCONFIG_LIBS_PRIVATE%" "${PKGCONFIG_LIBS_PRIVATE}"
601 FREETYPE2_PC_IN ${FREETYPE2_PC_IN})
603 string(REPLACE "%PKGCONFIG_REQUIRES%" "${PKGCONFIG_REQUIRES} ${PKGCONFIG_REQUIRES_PRIVATE}"
604 FREETYPE2_PC_IN ${FREETYPE2_PC_IN})
605 string(REPLACE "%PKGCONFIG_REQUIRES_PRIVATE%" ""
606 FREETYPE2_PC_IN ${FREETYPE2_PC_IN})
607 string(REPLACE "%PKGCONFIG_LIBS%" "${PKGCONFIG_LIBS} ${PKGCONFIG_LIBS_PRIVATE}"
608 FREETYPE2_PC_IN ${FREETYPE2_PC_IN})
609 string(REPLACE "%PKGCONFIG_LIBS_PRIVATE%" ""
610 FREETYPE2_PC_IN ${FREETYPE2_PC_IN})
613 set(FREETYPE2_PC_IN_NAME "${PROJECT_BINARY_DIR}/freetype2.pc")
614 if (EXISTS "${FREETYPE2_PC_IN_NAME}")
615 file(READ "${FREETYPE2_PC_IN_NAME}" ORIGINAL_FREETYPE2_PC_IN)
617 set(ORIGINAL_FREETYPE2_PC_IN "")
619 if (NOT (ORIGINAL_FREETYPE2_PC_IN STREQUAL FREETYPE2_PC_IN))
620 file(WRITE "${FREETYPE2_PC_IN_NAME}" ${FREETYPE2_PC_IN})
624 FILES ${PROJECT_BINARY_DIR}/freetype2.pc
625 DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig
628 include(CMakePackageConfigHelpers)
629 write_basic_package_version_file(
630 ${PROJECT_BINARY_DIR}/freetype-config-version.cmake
631 VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}
632 COMPATIBILITY SameMajorVersion)
635 TARGETS freetype freetype-interface
636 EXPORT freetype-targets
637 LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
638 ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
639 RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
640 FRAMEWORK DESTINATION Library/Frameworks
643 EXPORT freetype-targets
644 DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/freetype
645 FILE freetype-config.cmake
648 FILES ${PROJECT_BINARY_DIR}/freetype-config-version.cmake
649 DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/freetype
655 set(CPACK_PACKAGE_NAME ${CMAKE_PROJECT_NAME})
656 set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "The FreeType font rendering library.")
657 set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README")
658 set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE.TXT")
660 set(CPACK_PACKAGE_VERSION_MAJOR ${VERSION_MAJOR})
661 set(CPACK_PACKAGE_VERSION_MINOR ${VERSION_MINOR})
662 set(CPACK_PACKAGE_VERSION_PATCH ${VERSION_PATCH})
663 set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
666 set(CPACK_GENERATOR ZIP)
668 set(CPACK_GENERATOR TGZ)
671 set(CPACK_COMPONENT_LIBRARIES_DISPLAY_NAME "Libraries")
672 set(CPACK_COMPONENT_HEADERS_DISPLAY_NAME "C/C++ Headers")
673 set(CPACK_COMPONENT_LIBRARIES_DESCRIPTION
674 "Library used to build programs which use FreeType")
675 set(CPACK_COMPONENT_HEADERS_DESCRIPTION
676 "C/C++ header files for use with FreeType")
677 set(CPACK_COMPONENT_HEADERS_DEPENDS libraries)
678 set(CPACK_COMPONENT_LIBRARIES_GROUP "Development")
679 set(CPACK_COMPONENT_HEADERS_GROUP "Development")