FindFreetype¶
Finds the FreeType font renderer library:
find_package(Freetype [<version>] [...])
在 3.7 版被加入: Debug and Release (optimized) library variants are found separately.
Imported Targets¶
This module provides the following Imported Targets:
Freetype::Freetype
在 3.10 版被加入.
Target encapsulating the Freetype library usage requirements, available if Freetype is found.
結果變數¶
該模組定義了以下變數:
Freetype_FOUND
在 3.3 版被加入.
Boolean indicating whether (the requested version of) Freetype was found.
Freetype_VERSION
在 4.2 版被加入.
The version of Freetype found.
FREETYPE_INCLUDE_DIRS
Include directories containing headers needed to use Freetype. This is the concatenation of
FREETYPE_INCLUDE_DIR_ft2build
andFREETYPE_INCLUDE_DIR_freetype2
variables.FREETYPE_LIBRARIES
Libraries needed to link against for using Freetype.
在 3.7 版被加入: Debug and Release library variants are found separately.
快取變數¶
The following cache variables may also be set:
FREETYPE_INCLUDE_DIR_ft2build
The directory containing the main Freetype API configuration header.
FREETYPE_INCLUDE_DIR_freetype2
The directory containing Freetype public headers.
提示¶
This module accepts the following variables:
FREETYPE_DIR
The user may set this environment variable to the root directory of a Freetype installation to find Freetype in non-standard locations.
已棄用的變數¶
The following variables are provided for backward compatibility:
FREETYPE_FOUND
在 4.2 版之後被棄用: Use
Freetype_FOUND
, which has the same value.Boolean indicating whether (the requested version of) Freetype was found.
FREETYPE_VERSION_STRING
在 4.2 版之後被棄用: Superseded by the
Freetype_VERSION
.The version of Freetype found.
範例¶
Finding Freetype and linking it to a project target:
find_package(Freetype)
target_link_libraries(project_target PRIVATE Freetype::Freetype)