FindEXPAT¶
Finds the native Expat headers and library. 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.
結果變數¶
This module sets the following variables:
EXPAT_INCLUDE_DIRS
Include directories containing
expat.h
and related headers needed to use Expat.EXPAT_LIBRARIES
Libraries needed to link against to use Expat.
EXPAT_FOUND
Boolean indicating whether the Expat is found.
Hints¶
This module accepts the following variables:
EXPAT_USE_STATIC_LIBS
在 3.28 版被加入.
Set to
TRUE
to use static libraries.在 3.31 版被加入: Implemented on non-Windows platforms.
範例¶
Finding Expat library and linking it to a project target:
find_package(EXPAT)
target_link_libraries(project_target PRIVATE EXPAT::EXPAT)