FindFontconfig¶
在 3.14 版被加入.
Finds Fontconfig, a library for font configuration and customization:
find_package(Fontconfig [<version>] [...])
Imported Targets¶
This module provides the following Imported Targets:
Fontconfig::Fontconfig
Target encapsulating the Fontconfig usage requirements, available if Fontconfig is found.
結果變數¶
該模組定義了以下變數:
Fontconfig_FOUND
Boolean indicating whether (the requested version of) Fontconfig was found.
Fontconfig_VERSION
The version of Fontconfig found.
Fontconfig_LIBRARIES
The libraries to link against to use Fontconfig.
Fontconfig_INCLUDE_DIRS
包含使用 Fontconfig 所需的標頭檔的引入目錄。
Fontconfig_COMPILE_OPTIONS
Compiler options needed to use Fontconfig. These should be passed to
target_compile_options()
when not using theFontconfig::Fontconfig
imported target.
範例¶
Finding Fontconfig and linking it to a project target:
find_package(Fontconfig)
target_link_libraries(project_target PRIVATE Fontconfig::Fontconfig)