FindICU

添加于 3.7 版本。

查找 Unicode 国际组件 (ICU) 库和程序。

此模块支持多个组件。组件可以包括以下任何一个:datai18niolelxtesttuuc

请注意,在 Windows 上 data 被命名为 dti18n 被命名为 in;可以使用任何名称,并将自动选择适当的平台特定库名称。

添加于 3.11 版本:在 Windows 上添加了对静态库的支持。

此模块报告有关 ICU 安装的信息,存储在以下几个变量中。通用变量

ICU_FOUND - true if the main programs and libraries were found
ICU_INCLUDE_DIRS - the directories containing the ICU headers
ICU_LIBRARIES - component libraries to be linked
ICU_VERSION - ICU release version

导入目标

ICU::<C>

其中 <C> 是 ICU 组件的名称,例如 ICU::i18n<C> 是小写的。

ICU 程序在以下变量中报告

ICU_GENCNVAL_EXECUTABLE - path to gencnval executable
ICU_ICUINFO_EXECUTABLE - path to icuinfo executable
ICU_GENBRK_EXECUTABLE - path to genbrk executable
ICU_ICU-CONFIG_EXECUTABLE - path to icu-config executable
ICU_GENRB_EXECUTABLE - path to genrb executable
ICU_GENDICT_EXECUTABLE - path to gendict executable
ICU_DERB_EXECUTABLE - path to derb executable
ICU_PKGDATA_EXECUTABLE - path to pkgdata executable
ICU_UCONV_EXECUTABLE - path to uconv executable
ICU_GENCFU_EXECUTABLE - path to gencfu executable
ICU_MAKECONV_EXECUTABLE - path to makeconv executable
ICU_GENNORM2_EXECUTABLE - path to gennorm2 executable
ICU_GENCCODE_EXECUTABLE - path to genccode executable
ICU_GENSPREP_EXECUTABLE - path to gensprep executable
ICU_ICUPKG_EXECUTABLE - path to icupkg executable
ICU_GENCMN_EXECUTABLE - path to gencmn executable

ICU 组件库在以下变量中报告

ICU_<C>_FOUND - ON if component was found; ``<C>`` is upper-case.
ICU_<C>_LIBRARIES - libraries for component; ``<C>`` is upper-case.

ICU 数据文件在以下变量中报告

ICU_MAKEFILE_INC - Makefile.inc
ICU_PKGDATA_INC - pkgdata.inc

此模块从以下位置读取有关搜索结果的提示

ICU_ROOT - the root of the ICU installation

环境变量 ICU_ROOT 也可以使用;ICU_ROOT 变量优先。

以下缓存变量也可以设置

ICU_<P>_EXECUTABLE - the path to executable <P>; ``<P>`` is upper-case.
ICU_INCLUDE_DIR - the directory containing the ICU headers
ICU_<C>_LIBRARY - the library for component <C>; ``<C>`` is upper-case.

注意

在大多数情况下,除非有多个 ICU 版本可用并且需要特定版本,否则以上变量都不需要设置。