FindICU¶
新增於 3.7 版本。
尋找國際組件 Unicode (ICU) 函式庫與程式。
此模組支援多個組件。組件可以包含以下任何一個:data
、i18n
、io
、le
、lx
、test
、tu
和 uc
。
請注意,在 Windows 上,data
名為 dt
,而 i18n
名為 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 版本可用且需要特定版本,否則不需要設定上述任何變數。