3 # Copyright (C) 2013-2024 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...3.5)
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 "3")
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)
268 # FreePNG calls FindZLIB so unset ZLIB_FOUND to respect FT_DISABLE_ZLIB
272 if (NOT FT_DISABLE_ZLIB)
274 find_package(ZLIB REQUIRED)
280 if (NOT FT_DISABLE_BZIP2)
281 # Genuine BZip2 does not provide bzip2.pc, but some platforms have it.
282 # For better dependency in freetype2.pc, bzip2.pc is searched
283 # regardless of the availability of libbz2. If bzip2.pc is found,
284 # Requires.private is used instead of Libs.private.
285 if (FT_REQUIRE_BZIP2)
286 find_package(BZip2 REQUIRED)
290 pkg_check_modules(PC_BZIP2 bzip2)
293 if (NOT FT_DISABLE_BROTLI)
294 if (FT_REQUIRE_BROTLI)
295 find_package(BrotliDec REQUIRED)
297 find_package(BrotliDec)
301 # Create the configuration file
302 if (UNIX AND NOT WIN32)
303 check_include_file("unistd.h" HAVE_UNISTD_H)
304 check_include_file("fcntl.h" HAVE_FCNTL_H)
306 file(READ "${PROJECT_SOURCE_DIR}/builds/unix/ftconfig.h.in"
310 "#undef +(HAVE_UNISTD_H)" "#define \\1 1"
311 FTCONFIG_H "${FTCONFIG_H}")
315 "#undef +(HAVE_FCNTL_H)" "#define \\1 1"
316 FTCONFIG_H "${FTCONFIG_H}")
319 file(READ "${PROJECT_SOURCE_DIR}/include/freetype/config/ftconfig.h"
323 set(FTCONFIG_H_NAME "${PROJECT_BINARY_DIR}/include/freetype/config/ftconfig.h")
324 if (EXISTS "${FTCONFIG_H_NAME}")
325 file(READ "${FTCONFIG_H_NAME}" ORIGINAL_FTCONFIG_H)
327 set(ORIGINAL_FTCONFIG_H "")
329 if (NOT (ORIGINAL_FTCONFIG_H STREQUAL FTCONFIG_H))
330 file(WRITE "${FTCONFIG_H_NAME}" "${FTCONFIG_H}")
334 # Create the options file
335 file(READ "${PROJECT_SOURCE_DIR}/include/freetype/config/ftoption.h"
339 "/\\* +(#define +FT_CONFIG_OPTION_SYSTEM_ZLIB) +\\*/" "\\1"
340 FTOPTION_H "${FTOPTION_H}")
344 "/\\* +(#define +FT_CONFIG_OPTION_USE_BZIP2) +\\*/" "\\1"
345 FTOPTION_H "${FTOPTION_H}")
349 "/\\* +(#define +FT_CONFIG_OPTION_USE_PNG) +\\*/" "\\1"
350 FTOPTION_H "${FTOPTION_H}")
354 "/\\* +(#define +FT_CONFIG_OPTION_USE_HARFBUZZ) +\\*/" "\\1"
355 FTOPTION_H "${FTOPTION_H}")
359 "/\\* +(#define +FT_CONFIG_OPTION_USE_BROTLI) +\\*/" "\\1"
360 FTOPTION_H "${FTOPTION_H}")
363 if (FT_ENABLE_ERROR_STRINGS)
365 "/\\* +(#define +FT_CONFIG_OPTION_ERROR_STRINGS) +\\*/" "\\1"
366 FTOPTION_H "${FTOPTION_H}")
369 set(FTOPTION_H_NAME "${PROJECT_BINARY_DIR}/include/freetype/config/ftoption.h")
370 if (EXISTS "${FTOPTION_H_NAME}")
371 file(READ "${FTOPTION_H_NAME}" ORIGINAL_FTOPTION_H)
373 set(ORIGINAL_FTOPTION_H "")
375 if (NOT (ORIGINAL_FTOPTION_H STREQUAL FTOPTION_H))
376 file(WRITE "${FTOPTION_H_NAME}" "${FTOPTION_H}")
380 file(GLOB PUBLIC_HEADERS "include/ft2build.h" "include/freetype/*.h")
381 file(GLOB PUBLIC_CONFIG_HEADERS "include/freetype/config/*.h")
382 file(GLOB PRIVATE_HEADERS "include/freetype/internal/*.h")
386 src/autofit/autofit.c
415 src/pshinter/pshinter.c
416 src/psnames/psnames.c
422 src/truetype/truetype.c
425 src/winfonts/winfnt.c
429 list(APPEND BASE_SRCS "builds/windows/ftsystem.c")
431 list(APPEND BASE_SRCS "builds/unix/ftsystem.c")
433 list(APPEND BASE_SRCS "src/base/ftsystem.c")
438 list(APPEND BASE_SRCS builds/windows/ftdebug.c
441 list(APPEND BASE_SRCS builds/wince/ftdebug.c)
443 list(APPEND BASE_SRCS src/base/ftdebug.c)
447 list(APPEND BASE_SRCS builds/mac/freetype-Info.plist)
451 if (NOT DISABLE_FORCE_DEBUG_POSTFIX)
452 set(CMAKE_DEBUG_POSTFIX d)
458 ${PUBLIC_CONFIG_HEADERS}
463 set_target_properties(
465 C_VISIBILITY_PRESET hidden)
467 target_compile_definitions(
468 freetype PRIVATE FT2_BUILD_LIBRARY)
471 target_compile_definitions(
472 freetype PRIVATE _CRT_SECURE_NO_WARNINGS _CRT_NONSTDC_NO_WARNINGS)
473 if (BUILD_SHARED_LIBS)
474 target_compile_definitions(
475 freetype PRIVATE DLL_EXPORT)
479 if (BUILD_SHARED_LIBS)
480 set_target_properties(freetype PROPERTIES
481 VERSION ${LIBRARY_VERSION}
482 SOVERSION ${LIBRARY_SOVERSION})
485 # Pick up ftconfig.h and ftoption.h generated above, first.
486 target_include_directories(
489 $<INSTALL_INTERFACE:include/freetype2>
490 $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/include>
491 $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
493 ${CMAKE_CURRENT_BINARY_DIR}/include
494 ${CMAKE_CURRENT_SOURCE_DIR}/include
496 # Make <ftconfig.h> available for builds/unix/ftsystem.c.
497 ${CMAKE_CURRENT_BINARY_DIR}/include/freetype/config
502 set_property(SOURCE ${PUBLIC_CONFIG_HEADERS}
503 PROPERTY MACOSX_PACKAGE_LOCATION Headers/config
505 set_target_properties(freetype PROPERTIES
507 MACOSX_FRAMEWORK_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/builds/mac/freetype-Info.plist
508 PUBLIC_HEADER "${PUBLIC_HEADERS}"
509 XCODE_ATTRIBUTE_INSTALL_PATH "@rpath"
513 # 'freetype-interface' is an interface library, to be accessed with
514 # `EXPORT_NAME Freetype::Freetype`. This is the target name provided by
515 # CMake's `FindFreetype.cmake`, so we provide it for compatibility.
516 add_library(freetype-interface INTERFACE)
517 set_target_properties(freetype-interface PROPERTIES
518 EXPORT_NAME Freetype::Freetype
519 INTERFACE_LINK_LIBRARIES freetype)
521 set(PKGCONFIG_REQUIRES "")
522 set(PKGCONFIG_REQUIRES_PRIVATE "")
523 set(PKGCONFIG_LIBS "-L\${libdir} -lfreetype")
524 set(PKGCONFIG_LIBS_PRIVATE "")
527 target_link_libraries(freetype PRIVATE ${ZLIB_LIBRARIES})
528 target_include_directories(freetype PRIVATE ${ZLIB_INCLUDE_DIRS})
529 list(APPEND PKGCONFIG_REQUIRES_PRIVATE "zlib")
532 target_link_libraries(freetype PRIVATE ${BZIP2_LIBRARIES})
533 target_include_directories(freetype PRIVATE ${BZIP2_INCLUDE_DIR}) # not BZIP2_INCLUDE_DIRS
535 list(APPEND PKGCONFIG_REQUIRES_PRIVATE "bzip2")
537 list(APPEND PKGCONFIG_LIBS_PRIVATE "-lbz2")
541 target_link_libraries(freetype PRIVATE ${PNG_LIBRARIES})
542 target_compile_definitions(freetype PRIVATE ${PNG_DEFINITIONS})
543 target_include_directories(freetype PRIVATE ${PNG_INCLUDE_DIRS})
544 list(APPEND PKGCONFIG_REQUIRES_PRIVATE "libpng")
547 target_link_libraries(freetype PRIVATE ${HarfBuzz_LIBRARY})
548 target_include_directories(freetype PRIVATE ${HarfBuzz_INCLUDE_DIRS})
549 list(APPEND PKGCONFIG_REQUIRES_PRIVATE "harfbuzz >= ${HARFBUZZ_MIN_VERSION}")
552 target_link_libraries(freetype PRIVATE ${BROTLIDEC_LIBRARIES})
553 target_compile_definitions(freetype PRIVATE ${BROTLIDEC_DEFINITIONS})
554 target_include_directories(freetype PRIVATE ${BROTLIDEC_INCLUDE_DIRS})
555 list(APPEND PKGCONFIG_REQUIRES_PRIVATE "libbrotlidec")
560 include(GNUInstallDirs)
562 if (NOT SKIP_INSTALL_HEADERS AND NOT SKIP_INSTALL_ALL)
564 # Note the trailing slash in the argument to `DIRECTORY'!
565 DIRECTORY ${PROJECT_SOURCE_DIR}/include/
566 DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/freetype2
568 PATTERN "internal" EXCLUDE
569 PATTERN "ftconfig.h" EXCLUDE
570 PATTERN "ftoption.h" EXCLUDE)
572 FILES ${PROJECT_BINARY_DIR}/include/freetype/config/ftconfig.h
573 ${PROJECT_BINARY_DIR}/include/freetype/config/ftoption.h
574 DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/freetype2/freetype/config
578 if (NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL)
579 # Generate the pkg-config file
580 file(READ "${PROJECT_SOURCE_DIR}/builds/unix/freetype2.in" FREETYPE2_PC_IN)
582 string(REPLACE ";" ", " PKGCONFIG_REQUIRES_PRIVATE "${PKGCONFIG_REQUIRES_PRIVATE}")
584 string(REPLACE "%prefix%" ${CMAKE_INSTALL_PREFIX}
585 FREETYPE2_PC_IN ${FREETYPE2_PC_IN})
586 string(REPLACE "%exec_prefix%" "\${prefix}"
587 FREETYPE2_PC_IN ${FREETYPE2_PC_IN})
588 string(REPLACE "%libdir%" "\${prefix}/${CMAKE_INSTALL_LIBDIR}"
589 FREETYPE2_PC_IN ${FREETYPE2_PC_IN})
590 string(REPLACE "%includedir%" "\${prefix}/${CMAKE_INSTALL_INCLUDEDIR}"
591 FREETYPE2_PC_IN ${FREETYPE2_PC_IN})
592 string(REPLACE "%ft_version%" "${LIBTOOL_CURRENT}.${LIBTOOL_REVISION}.${LIBTOOL_AGE}"
593 FREETYPE2_PC_IN ${FREETYPE2_PC_IN})
595 if (BUILD_SHARED_LIBS)
596 string(REPLACE "%PKGCONFIG_REQUIRES%" "${PKGCONFIG_REQUIRES}"
597 FREETYPE2_PC_IN ${FREETYPE2_PC_IN})
598 string(REPLACE "%PKGCONFIG_REQUIRES_PRIVATE%" "${PKGCONFIG_REQUIRES_PRIVATE}"
599 FREETYPE2_PC_IN ${FREETYPE2_PC_IN})
600 string(REPLACE "%PKGCONFIG_LIBS%" "${PKGCONFIG_LIBS}"
601 FREETYPE2_PC_IN ${FREETYPE2_PC_IN})
602 string(REPLACE "%PKGCONFIG_LIBS_PRIVATE%" "${PKGCONFIG_LIBS_PRIVATE}"
603 FREETYPE2_PC_IN ${FREETYPE2_PC_IN})
605 string(REPLACE "%PKGCONFIG_REQUIRES%" "${PKGCONFIG_REQUIRES} ${PKGCONFIG_REQUIRES_PRIVATE}"
606 FREETYPE2_PC_IN ${FREETYPE2_PC_IN})
607 string(REPLACE "%PKGCONFIG_REQUIRES_PRIVATE%" ""
608 FREETYPE2_PC_IN ${FREETYPE2_PC_IN})
609 string(REPLACE "%PKGCONFIG_LIBS%" "${PKGCONFIG_LIBS} ${PKGCONFIG_LIBS_PRIVATE}"
610 FREETYPE2_PC_IN ${FREETYPE2_PC_IN})
611 string(REPLACE "%PKGCONFIG_LIBS_PRIVATE%" ""
612 FREETYPE2_PC_IN ${FREETYPE2_PC_IN})
615 set(FREETYPE2_PC_IN_NAME "${PROJECT_BINARY_DIR}/freetype2.pc")
616 if (EXISTS "${FREETYPE2_PC_IN_NAME}")
617 file(READ "${FREETYPE2_PC_IN_NAME}" ORIGINAL_FREETYPE2_PC_IN)
619 set(ORIGINAL_FREETYPE2_PC_IN "")
621 if (NOT (ORIGINAL_FREETYPE2_PC_IN STREQUAL FREETYPE2_PC_IN))
622 file(WRITE "${FREETYPE2_PC_IN_NAME}" ${FREETYPE2_PC_IN})
626 FILES ${PROJECT_BINARY_DIR}/freetype2.pc
627 DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig
630 include(CMakePackageConfigHelpers)
631 write_basic_package_version_file(
632 ${PROJECT_BINARY_DIR}/freetype-config-version.cmake
633 VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}
634 COMPATIBILITY SameMajorVersion)
637 TARGETS freetype freetype-interface
638 EXPORT freetype-targets
639 LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
640 ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
641 RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
642 FRAMEWORK DESTINATION Library/Frameworks
645 EXPORT freetype-targets
646 DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/freetype
647 FILE freetype-config.cmake
650 FILES ${PROJECT_BINARY_DIR}/freetype-config-version.cmake
651 DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/freetype
657 set(CPACK_PACKAGE_NAME ${CMAKE_PROJECT_NAME})
658 set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "The FreeType font rendering library.")
659 set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README")
660 set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE.TXT")
662 set(CPACK_PACKAGE_VERSION_MAJOR ${VERSION_MAJOR})
663 set(CPACK_PACKAGE_VERSION_MINOR ${VERSION_MINOR})
664 set(CPACK_PACKAGE_VERSION_PATCH ${VERSION_PATCH})
665 set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
668 set(CPACK_GENERATOR ZIP)
670 set(CPACK_GENERATOR TGZ)
673 set(CPACK_COMPONENT_LIBRARIES_DISPLAY_NAME "Libraries")
674 set(CPACK_COMPONENT_HEADERS_DISPLAY_NAME "C/C++ Headers")
675 set(CPACK_COMPONENT_LIBRARIES_DESCRIPTION
676 "Library used to build programs which use FreeType")
677 set(CPACK_COMPONENT_HEADERS_DESCRIPTION
678 "C/C++ header files for use with FreeType")
679 set(CPACK_COMPONENT_HEADERS_DEPENDS libraries)
680 set(CPACK_COMPONENT_LIBRARIES_GROUP "Development")
681 set(CPACK_COMPONENT_HEADERS_GROUP "Development")