FindEXPAT¶
Finds the native Expat headers and library:
find_package(EXPAT [<version>] [...])
Expat is a stream-oriented XML parser library written in C.
Imported Targets¶
This module provides the following Imported Targets:
EXPAT::EXPAT在 3.10 版被加入.
Target encapsulating the Expat library (
expat) usage requirements. This target is available only if Expat is found.
結果變數¶
該模組定義了以下變數:
EXPAT_FOUNDBoolean indicating whether (the requested version of) Expat was found.
EXPAT_VERSION在 4.2 版被加入.
The version of Expat found.
EXPAT_INCLUDE_DIRSInclude directories containing
expat.hand related headers needed to use Expat.EXPAT_LIBRARIESLibraries needed to link against to use Expat.
提示¶
This module accepts the following variables:
EXPAT_USE_STATIC_LIBS在 3.28 版被加入.
Set to
TRUEto use static libraries.在 3.31 版被加入: Implemented on non-Windows platforms.
已棄用的變數¶
The following variables are provided for backward compatibility:
EXPAT_VERSION_STRING在 4.2 版之後被棄用: Superseded by the
EXPAT_VERSION.The version of Expat found.
範例¶
Finding Expat library and linking it to a project target:
find_package(EXPAT)
target_link_libraries(project_target PRIVATE EXPAT::EXPAT)