Răsfoiți Sursa

Merge topic 'patch-FindEXPAT'

8e91ee67d9 FindEXPAT: Update documentation

Acked-by: Kitware Robot <[email protected]>
Merge-request: !10578
Brad King 10 luni în urmă
părinte
comite
4ebec03bbf
1 a modificat fișierele cu 23 adăugiri și 11 ștergeri
  1. 23 11
      Modules/FindEXPAT.cmake

+ 23 - 11
Modules/FindEXPAT.cmake

@@ -5,36 +5,39 @@
 FindEXPAT
 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
 Imported Targets
 ^^^^^^^^^^^^^^^^
 ^^^^^^^^^^^^^^^^
 
 
-.. versionadded:: 3.10
-
-This module defines the following :prop_tgt:`IMPORTED` targets:
+This module provides the following :ref:`Imported Targets`:
 
 
 ``EXPAT::EXPAT``
 ``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
 Result Variables
 ^^^^^^^^^^^^^^^^
 ^^^^^^^^^^^^^^^^
 
 
-This module will set the following variables in your project:
+This module sets the following variables:
 
 
 ``EXPAT_INCLUDE_DIRS``
 ``EXPAT_INCLUDE_DIRS``
-  where to find expat.h, etc.
+  Include directories containing ``expat.h`` and related headers needed to use
+  Expat.
 ``EXPAT_LIBRARIES``
 ``EXPAT_LIBRARIES``
-  the libraries to link against to use Expat.
+  Libraries needed to link against to use Expat.
 ``EXPAT_FOUND``
 ``EXPAT_FOUND``
-  true if the Expat headers and libraries were found.
+  Boolean indicating whether the Expat is found.
 
 
 Hints
 Hints
 ^^^^^
 ^^^^^
 
 
-``EXPAT_USE_STATIC_LIBS``
+This module accepts the following variables:
 
 
+``EXPAT_USE_STATIC_LIBS``
   .. versionadded:: 3.28
   .. versionadded:: 3.28
 
 
   Set to ``TRUE`` to use static libraries.
   Set to ``TRUE`` to use static libraries.
@@ -43,6 +46,15 @@ Hints
 
 
     Implemented on non-Windows platforms.
     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)
 cmake_policy(PUSH)