diff --git a/Modules/FindEXPAT.cmake b/Modules/FindEXPAT.cmake index 0dcf361df8..dd45e58d78 100644 --- a/Modules/FindEXPAT.cmake +++ b/Modules/FindEXPAT.cmake @@ -5,36 +5,39 @@ FindEXPAT --------- -Find the native Expat headers and library. -Expat is a stream-oriented XML parser library written in C. +Finds the native Expat headers and library. Expat is a stream-oriented XML +parser library written in C. Imported Targets ^^^^^^^^^^^^^^^^ -.. versionadded:: 3.10 - -This module defines the following :prop_tgt:`IMPORTED` targets: +This module provides the following :ref:`Imported Targets`: ``EXPAT::EXPAT`` - The Expat ``expat`` library, if found. + .. versionadded:: 3.10 + + Target encapsulating the Expat library (``expat``) usage requirements. This + target is available only if Expat is found. Result Variables ^^^^^^^^^^^^^^^^ -This module will set the following variables in your project: +This module sets the following variables: ``EXPAT_INCLUDE_DIRS`` - where to find expat.h, etc. + Include directories containing ``expat.h`` and related headers needed to use + Expat. ``EXPAT_LIBRARIES`` - the libraries to link against to use Expat. + Libraries needed to link against to use Expat. ``EXPAT_FOUND`` - true if the Expat headers and libraries were found. + Boolean indicating whether the Expat is found. Hints ^^^^^ -``EXPAT_USE_STATIC_LIBS`` +This module accepts the following variables: +``EXPAT_USE_STATIC_LIBS`` .. versionadded:: 3.28 Set to ``TRUE`` to use static libraries. @@ -43,6 +46,15 @@ Hints Implemented on non-Windows platforms. +Examples +^^^^^^^^ + +Finding Expat library and linking it to a project target: + +.. code-block:: cmake + + find_package(EXPAT) + target_link_libraries(project_target PRIVATE EXPAT::EXPAT) #]=======================================================================] cmake_policy(PUSH)