1
0
Эх сурвалжийг харах

Find*: Add missing <PackageName>_FOUND variables

* FindKDE4: Added note about KDE4_FOUND result variable (it is set by
  the upstream FindKDE4Internal module, and now also synced in the docs
  and code for consistency).

For the sake of completeness with other find modules, also the following
deprecated find modules are synced as they already provided these
variables:

* FindDart: Documented the Dart_FOUND result variable.
* FindUnixCommands: Updated documentation (documented UnixCommands_FOUND
  result variable, and listed cache variables used by this module).

Issue: #27242
Peter Kokot 1 долоо хоног өмнө
parent
commit
c8ea0ba3be

+ 4 - 3
Help/release/4.2.rst

@@ -187,9 +187,10 @@ CPack
 Deprecated and Removed Features
 Deprecated and Removed Features
 ===============================
 ===============================
 
 
-* The uppercased ``<PACKAGENAME>_FOUND`` result variables of find modules
-  are now deprecated in favor of ``<PackageName>_FOUND`` result variables,
-  where appropriate.  See documentation of each find module for details.
+* All find modules now provide a ``<PackageName>_FOUND`` result variable
+  matching the casing of its module name.  Existing variants, such as the
+  uppercased ``<PACKAGENAME>_FOUND``, are deprecated where appropriate.
+  See documentation of each find module for details.
 
 
 * The :module:`FindwxWidgets` module's result variable
 * The :module:`FindwxWidgets` module's result variable
   ``wxWidgets_USE_FILE`` is now deprecated in favor of including the
   ``wxWidgets_USE_FILE`` is now deprecated in favor of including the

+ 11 - 0
Modules/FindCygwin.cmake

@@ -25,6 +25,11 @@ Result Variables
 
 
 This module defines the following variables:
 This module defines the following variables:
 
 
+``Cygwin_FOUND``
+  .. versionadded:: 4.2
+
+  Boolean indicating whether Cygwin was found.
+
 ``CYGWIN_INSTALL_PATH``
 ``CYGWIN_INSTALL_PATH``
   The path to the Cygwin root installation directory.
   The path to the Cygwin root installation directory.
 
 
@@ -65,3 +70,9 @@ if (WIN32)
   mark_as_advanced(CYGWIN_BAT)
   mark_as_advanced(CYGWIN_BAT)
 
 
 endif ()
 endif ()
+
+if(CYGWIN_BAT AND CYGWIN_INSTALL_PATH)
+  set(Cygwin_FOUND TRUE)
+else()
+  set(Cygwin_FOUND FALSE)
+endif()

+ 12 - 0
Modules/FindDart.cmake

@@ -17,9 +17,21 @@ Finds DART:
 This module looks for the dart testing software and sets ``DART_ROOT`` to
 This module looks for the dart testing software and sets ``DART_ROOT`` to
 point to where it found it.
 point to where it found it.
 
 
+Result Variables
+^^^^^^^^^^^^^^^^
+
+This module defines the following variables:
+
+``Dart_FOUND``
+  .. versionadded:: 3.3
+
+  Boolean indicating whether DART was found.
+
 Cache Variables
 Cache Variables
 ^^^^^^^^^^^^^^^
 ^^^^^^^^^^^^^^^
 
 
+The following cache variables may also be set:
+
 ``DART_ROOT``
 ``DART_ROOT``
   The path to the Dart root installation.
   The path to the Dart root installation.
 #]=======================================================================]
 #]=======================================================================]

+ 16 - 0
Modules/FindHTMLHelp.cmake

@@ -18,6 +18,16 @@ Help Workshop:
   For modern documentation, consider alternatives such as Microsoft Help Viewer
   For modern documentation, consider alternatives such as Microsoft Help Viewer
   for producing ``.mshc`` files or web-based documentation tools.
   for producing ``.mshc`` files or web-based documentation tools.
 
 
+Result Variables
+^^^^^^^^^^^^^^^^
+
+This module defines the following variables:
+
+``HTMLHelp_FOUND``
+  .. versionadded:: 4.2
+
+  Boolean indicating whether HTML Help was found.
+
 Cache Variables
 Cache Variables
 ^^^^^^^^^^^^^^^
 ^^^^^^^^^^^^^^^
 
 
@@ -78,3 +88,9 @@ if(WIN32)
     )
     )
 
 
 endif()
 endif()
+
+if(HTML_HELP_COMPILER AND HTML_HELP_INCLUDE_PATH AND HTML_HELP_LIBRARY)
+  set(HTMLHelp_FOUND TRUE)
+else()
+  set(HTMLHelp_FOUND FALSE)
+endif()

+ 11 - 0
Modules/FindKDE4.cmake

@@ -55,6 +55,15 @@ For usage details, refer to the upstream KDE 4 documentation.  For example,
 at the top of the ``FindKDE4Internal`` module a complete documentation is
 at the top of the ``FindKDE4Internal`` module a complete documentation is
 available for all variables and commands these modules provide.
 available for all variables and commands these modules provide.
 
 
+Result Variables
+^^^^^^^^^^^^^^^^
+
+This module defines the following variables:
+
+``KDE4_FOUND``
+  Boolean indicating whether KDE 4 was found.  This variable is set by the
+  upstream ``FindKDE4Internal`` module.
+
 Hints
 Hints
 ^^^^^
 ^^^^^
 
 
@@ -287,4 +296,6 @@ else ()
   if (KDE4_FIND_REQUIRED)
   if (KDE4_FIND_REQUIRED)
     message(FATAL_ERROR "ERROR: cmake/modules/FindKDE4Internal.cmake not found in ${_data_DIR}")
     message(FATAL_ERROR "ERROR: cmake/modules/FindKDE4Internal.cmake not found in ${_data_DIR}")
   endif ()
   endif ()
+
+  set(KDE4_FOUND FALSE)
 endif ()
 endif ()

+ 11 - 0
Modules/FindMsys.cmake

@@ -27,6 +27,11 @@ Result Variables
 
 
 This module defines the following variables:
 This module defines the following variables:
 
 
+``Msys_FOUND``
+  .. versionadded:: 4.2
+
+  Boolean indicating whether MSYS was found.
+
 ``MSYS_INSTALL_PATH``
 ``MSYS_INSTALL_PATH``
   The path to the MSYS root installation directory.
   The path to the MSYS root installation directory.
 
 
@@ -69,3 +74,9 @@ if (WIN32)
   mark_as_advanced(MSYS_CMD)
   mark_as_advanced(MSYS_CMD)
 
 
 endif ()
 endif ()
+
+if(MSYS_CMD AND MSYS_INSTALL_PATH)
+  set(Msys_FOUND TRUE)
+else()
+  set(Msys_FOUND FALSE)
+endif()

+ 16 - 0
Modules/FindPike.cmake

@@ -14,6 +14,16 @@ Finds the Pike compiler and interpreter:
 Pike is interpreted, general purpose, high-level, dynamic programming
 Pike is interpreted, general purpose, high-level, dynamic programming
 language.
 language.
 
 
+Result Variables
+^^^^^^^^^^^^^^^^
+
+This module defines the following variables:
+
+``Pike_FOUND``
+  .. versionadded:: 4.2
+
+  Boolean indicating whether Pike was found.
+
 Cache Variables
 Cache Variables
 ^^^^^^^^^^^^^^^
 ^^^^^^^^^^^^^^^
 
 
@@ -46,3 +56,9 @@ mark_as_advanced(
   PIKE_EXECUTABLE
   PIKE_EXECUTABLE
   PIKE_INCLUDE_PATH
   PIKE_INCLUDE_PATH
   )
   )
+
+if(PIKE_EXECUTABLE AND PIKE_INCLUDE_PATH)
+  set(Pike_FOUND TRUE)
+else()
+  set(Pike_FOUND FALSE)
+endif()

+ 16 - 0
Modules/FindSelfPackers.cmake

@@ -15,6 +15,16 @@ This module searches for executable packers-tools that compress executables or
 shared libraries into on-the-fly, self-extracting versions.  It currently
 shared libraries into on-the-fly, self-extracting versions.  It currently
 supports ``UPX``.
 supports ``UPX``.
 
 
+Result Variables
+^^^^^^^^^^^^^^^^
+
+This module defines the following variables:
+
+``SelfPackers_FOUND``
+  .. versionadded:: 4.2
+
+  Boolean indicating whether packer tools were found.
+
 Cache Variables
 Cache Variables
 ^^^^^^^^^^^^^^^
 ^^^^^^^^^^^^^^^
 
 
@@ -85,3 +95,9 @@ mark_as_advanced(
   SELF_PACKER_FOR_EXECUTABLE_FLAGS
   SELF_PACKER_FOR_EXECUTABLE_FLAGS
   SELF_PACKER_FOR_SHARED_LIB_FLAGS
   SELF_PACKER_FOR_SHARED_LIB_FLAGS
 )
 )
+
+if(SELF_PACKER_FOR_EXECUTABLE AND SELF_PACKER_FOR_SHARED_LIB)
+  set(SelfPackers_FOUND TRUE)
+else()
+  set(SelfPackers_FOUND FALSE)
+endif()

+ 16 - 0
Modules/FindTclStub.cmake

@@ -22,6 +22,16 @@ aim to be portable across different Tcl releases.  It first calls the
 :module:`FindTCL` module to locate Tcl installation and then attempts to find
 :module:`FindTCL` module to locate Tcl installation and then attempts to find
 the stub libraries corresponding to the located Tcl version.
 the stub libraries corresponding to the located Tcl version.
 
 
+Result Variables
+^^^^^^^^^^^^^^^^
+
+This module defines the following variables:
+
+``TclStub_FOUND``
+  .. versionadded:: 4.2
+
+  Boolean indicating whether the Tcl Stub Library was found.
+
 Cache Variables
 Cache Variables
 ^^^^^^^^^^^^^^^
 ^^^^^^^^^^^^^^^
 
 
@@ -154,3 +164,9 @@ mark_as_advanced(
   TCL_STUB_LIBRARY
   TCL_STUB_LIBRARY
   TK_STUB_LIBRARY
   TK_STUB_LIBRARY
   )
   )
+
+if(TCL_STUB_LIBRARY AND TK_STUB_LIBRARY AND TTK_STUB_LIBRARY)
+  set(TclStub_FOUND TRUE)
+else()
+  set(TclStub_FOUND FALSE)
+endif()

+ 34 - 4
Modules/FindUnixCommands.cmake

@@ -9,15 +9,45 @@ FindUnixCommands
 
 
   Use :option:`${CMAKE_COMMAND} -E <cmake -E>` subcommands instead.
   Use :option:`${CMAKE_COMMAND} -E <cmake -E>` subcommands instead.
 
 
-Finds Unix commands, including the ones from Cygwin:
+Finds Unix commands ``bash``, ``cp``, ``gzip``, ``mv``, ``rm``, and
+``tar``, including the ones from Cygwin or MSYS:
 
 
 .. code-block:: cmake
 .. code-block:: cmake
 
 
   find_package(UnixCommands [...])
   find_package(UnixCommands [...])
 
 
-This module looks for the Unix commands ``bash``, ``cp``, ``gzip``,
-``mv``, ``rm``, and ``tar`` and stores the result in the variables
-``BASH``, ``CP``, ``GZIP``, ``MV``, ``RM``, and ``TAR``.
+Result Variables
+^^^^^^^^^^^^^^^^
+
+This module defines the following variables:
+
+``UnixCommands_FOUND``
+  .. versionadded:: 3.3
+
+  Boolean indicating whether Unix commands were found.
+
+Cache Variables
+^^^^^^^^^^^^^^^
+
+The following cache variables may also be set:
+
+``BASH``
+  The path to the ``bash`` command-line executable.
+
+``CP``
+  The path to the ``cp`` command-line executable.
+
+``GZIP``
+  The path to the ``gzip`` command-line executable.
+
+``MV``
+  The path to the ``mv`` command-line executable.
+
+``RM``
+  The path to the ``rm`` command-line executable.
+
+``TAR``
+  The path to the ``tar`` command-line executable.
 #]=======================================================================]
 #]=======================================================================]
 
 
 include(${CMAKE_CURRENT_LIST_DIR}/FindCygwin.cmake)
 include(${CMAKE_CURRENT_LIST_DIR}/FindCygwin.cmake)

+ 16 - 0
Modules/FindWish.cmake

@@ -18,6 +18,16 @@ and libraries are, as well as identifying the name of the TCL library.
 If the :variable:`UNIX` variable is defined, the module will prioritize looking
 If the :variable:`UNIX` variable is defined, the module will prioritize looking
 for the Cygwin version of ``wish`` executable.
 for the Cygwin version of ``wish`` executable.
 
 
+Result Variables
+^^^^^^^^^^^^^^^^
+
+This module defines the following variables:
+
+``Wish_FOUND``
+  .. versionadded:: 4.2
+
+  Boolean indicating whether the ``wish`` executable was found.
+
 Cache Variables
 Cache Variables
 ^^^^^^^^^^^^^^^
 ^^^^^^^^^^^^^^^
 
 
@@ -100,3 +110,9 @@ find_program(TK_WISH
   )
   )
 
 
 mark_as_advanced(TK_WISH)
 mark_as_advanced(TK_WISH)
+
+if(TK_WISH)
+  set(Wish_FOUND TRUE)
+else()
+  set(Wish_FOUND FALSE)
+endif()