FindIntl¶
Added in version 3.2.
Finds internationalization support that includes message translation functions
such as gettext():
find_package(Intl [<version>] [...])
These functions originate from the GNU libintl library, which is part
of the GNU gettext utilities, but may also be provided by the standard C
library.
Imported Targets¶
This module provides the following Imported Targets:
Intl::IntlAdded in version 3.20.
Target encapsulating the Intl usage requirements, available if Intl is found.
Result Variables¶
This module defines the following variables:
Intl_FOUNDBoolean indicating whether (the requested version of) Intl was found.
Intl_VERSIONAdded in version 3.21.
The version of the found Intl implementation or library, in the format
x.y.z.Note
Some Intl implementations don't embed the version in their header files. In this case the variables
Intl_VERSION*will be empty.Intl_VERSION_MAJORAdded in version 3.21.
The major version of Intl found.
Intl_VERSION_MINORAdded in version 3.21.
The minor version of Intl found.
Intl_VERSION_PATCHAdded in version 3.21.
The patch version of Intl found.
Intl_INCLUDE_DIRSInclude directories containing headers needed to use Intl.
Intl_LIBRARIESThe libraries needed to link against to use Intl.
Cache Variables¶
The following cache variables may also be set:
Intl_IS_BUILT_INAdded in version 3.20.
Boolean indicating whether the found Intl functionality is provided by the standard C library rather than a separate
libintllibrary.Intl_INCLUDE_DIRThe directory containing the
libintl.hheader file.Intl_LIBRARYThe path to the Intl library (if any).
Note
On some platforms, such as Linux with GNU libc, the gettext functions are
present in the C standard library and libintl is not required. The
Intl_LIBRARY and Intl_INCLUDE_DIR will be empty in this case.
Examples¶
Finding the Intl support and linking the imported target for use in a project:
find_package(Intl)
target_link_libraries(app PRIVATE Intl::Intl)
See Also¶
The
FindGettextmodule to find and use the GNU gettext tools (msgmerge,msgfmt, etc.).