Browse Source

Merge topic 'patch-FindDoxygen-version'

15ffe27752 FindDoxygen: Add Doxygen_VERSION

Acked-by: Kitware Robot <[email protected]>
Merge-request: !11018
Brad King 3 months ago
parent
commit
8d79307408

+ 1 - 0
Auxiliary/vim/syntax/cmake.vim

@@ -2512,6 +2512,7 @@ syn keyword cmakeVariable contained
             \ DOXYGEN_USE_PDFLATEX
             \ DOXYGEN_VERBATIM_HEADERS
             \ DOXYGEN_VERBATIM_VARS
+            \ Doxygen_VERSION
             \ DOXYGEN_VERSION
             \ DOXYGEN_WARNINGS
             \ DOXYGEN_WARN_AS_ERROR

+ 3 - 0
Help/release/dev/find-modules.rst

@@ -16,6 +16,9 @@ Find Modules
 * The :module:`FindCups` module now provides a ``Cups_VERSION`` result
   variable.  The ``CUPS_VERSION_STRING`` result variable is deprecated.
 
+* The :module:`FindDoxygen` module now provides a ``Doxygen_VERSION`` result
+  variable.  The ``DOXYGEN_VERSION`` result variable is deprecated.
+
 * The :module:`FindEXPAT` module now provides a ``EXPAT_VERSION`` result
   variable.  The ``EXPAT_VERSION_STRING`` result variable is deprecated.
 

+ 13 - 4
Modules/FindDoxygen.cmake

@@ -11,7 +11,7 @@ for integrating Doxygen-based documentation into CMake projects:
 
 .. code-block:: cmake
 
-  find_package(Doxygen [<version>] [...] [COMPONENTS <components>...] [...])
+  find_package(Doxygen [<version>] [COMPONENTS <components>...] [...])
 
 Components
 ^^^^^^^^^^
@@ -95,7 +95,9 @@ This module defines the following variables:
   the ``DOXYGEN_FOUND`` variable is also set, except it has boolean value of
   ``YES`` or ``NO``.
 
-``DOXYGEN_VERSION``
+``Doxygen_VERSION``
+  .. versionadded:: 4.2
+
   The version of Doxygen found (as reported by ``doxygen --version``).
 
 Commands
@@ -529,6 +531,12 @@ are also defined but they are deprecated and should no longer be used:
   (i.e. without specifying components) it prevents this find module from
   searching for Graphviz's ``dot`` utility.
 
+``DOXYGEN_VERSION``
+  .. deprecated:: 4.2
+    Superseded by the ``Doxygen_VERSION``.
+
+  The version of Doxygen found.
+
 Examples
 ^^^^^^^^
 
@@ -765,7 +773,8 @@ macro(_Doxygen_find_doxygen)
     mark_as_advanced(DOXYGEN_EXECUTABLE)
 
     if(DOXYGEN_EXECUTABLE)
-        _Doxygen_get_version(DOXYGEN_VERSION _Doxygen_version_result "${DOXYGEN_EXECUTABLE}")
+        _Doxygen_get_version(Doxygen_VERSION _Doxygen_version_result "${DOXYGEN_EXECUTABLE}")
+        set(DOXYGEN_VERSION "${Doxygen_VERSION}")
 
         if(_Doxygen_version_result)
             if(NOT Doxygen_FIND_QUIETLY)
@@ -959,7 +968,7 @@ unset(_comp)
 find_package_handle_standard_args(
     Doxygen
     REQUIRED_VARS DOXYGEN_EXECUTABLE
-    VERSION_VAR DOXYGEN_VERSION
+    VERSION_VAR Doxygen_VERSION
     HANDLE_VERSION_RANGE
     HANDLE_COMPONENTS
 )

+ 1 - 1
Tests/CMakeOnly/AllFindModules/CMakeLists.txt

@@ -115,7 +115,7 @@ foreach(
     ALSA Armadillo
     BISON Boost BZip2 BZIP2
     CUDA Cups
-    DOXYGEN
+    Doxygen DOXYGEN
     EXPAT
     FLEX Freetype
     GIF GTK2