diff --git a/Help/release/4.2.rst b/Help/release/4.2.rst index 762ae57195..80d87d24e4 100644 --- a/Help/release/4.2.rst +++ b/Help/release/4.2.rst @@ -187,9 +187,10 @@ CPack Deprecated and Removed Features =============================== -* The uppercased ``_FOUND`` result variables of find modules - are now deprecated in favor of ``_FOUND`` result variables, - where appropriate. See documentation of each find module for details. +* All find modules now provide a ``_FOUND`` result variable + matching the casing of its module name. Existing variants, such as the + uppercased ``_FOUND``, are deprecated where appropriate. + See documentation of each find module for details. * The :module:`FindwxWidgets` module's result variable ``wxWidgets_USE_FILE`` is now deprecated in favor of including the diff --git a/Modules/FindCygwin.cmake b/Modules/FindCygwin.cmake index 38db22df89..102f2fe2ca 100644 --- a/Modules/FindCygwin.cmake +++ b/Modules/FindCygwin.cmake @@ -25,6 +25,11 @@ Result Variables This module defines the following variables: +``Cygwin_FOUND`` + .. versionadded:: 4.2 + + Boolean indicating whether Cygwin was found. + ``CYGWIN_INSTALL_PATH`` The path to the Cygwin root installation directory. @@ -65,3 +70,9 @@ if (WIN32) mark_as_advanced(CYGWIN_BAT) endif () + +if(CYGWIN_BAT AND CYGWIN_INSTALL_PATH) + set(Cygwin_FOUND TRUE) +else() + set(Cygwin_FOUND FALSE) +endif() diff --git a/Modules/FindDart.cmake b/Modules/FindDart.cmake index 252b6fabf9..6d4b9a3e72 100644 --- a/Modules/FindDart.cmake +++ b/Modules/FindDart.cmake @@ -17,9 +17,21 @@ Finds DART: This module looks for the dart testing software and sets ``DART_ROOT`` to 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 ^^^^^^^^^^^^^^^ +The following cache variables may also be set: + ``DART_ROOT`` The path to the Dart root installation. #]=======================================================================] diff --git a/Modules/FindHTMLHelp.cmake b/Modules/FindHTMLHelp.cmake index 71abbe8b83..cb9b62c86b 100644 --- a/Modules/FindHTMLHelp.cmake +++ b/Modules/FindHTMLHelp.cmake @@ -18,6 +18,16 @@ Help Workshop: For modern documentation, consider alternatives such as Microsoft Help Viewer 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 ^^^^^^^^^^^^^^^ @@ -78,3 +88,9 @@ if(WIN32) ) endif() + +if(HTML_HELP_COMPILER AND HTML_HELP_INCLUDE_PATH AND HTML_HELP_LIBRARY) + set(HTMLHelp_FOUND TRUE) +else() + set(HTMLHelp_FOUND FALSE) +endif() diff --git a/Modules/FindKDE4.cmake b/Modules/FindKDE4.cmake index 4d289f6221..04c76da73d 100644 --- a/Modules/FindKDE4.cmake +++ b/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 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 ^^^^^ @@ -287,4 +296,6 @@ else () if (KDE4_FIND_REQUIRED) message(FATAL_ERROR "ERROR: cmake/modules/FindKDE4Internal.cmake not found in ${_data_DIR}") endif () + + set(KDE4_FOUND FALSE) endif () diff --git a/Modules/FindMsys.cmake b/Modules/FindMsys.cmake index 42657984d1..fcf62b1f3e 100644 --- a/Modules/FindMsys.cmake +++ b/Modules/FindMsys.cmake @@ -27,6 +27,11 @@ Result Variables This module defines the following variables: +``Msys_FOUND`` + .. versionadded:: 4.2 + + Boolean indicating whether MSYS was found. + ``MSYS_INSTALL_PATH`` The path to the MSYS root installation directory. @@ -69,3 +74,9 @@ if (WIN32) mark_as_advanced(MSYS_CMD) endif () + +if(MSYS_CMD AND MSYS_INSTALL_PATH) + set(Msys_FOUND TRUE) +else() + set(Msys_FOUND FALSE) +endif() diff --git a/Modules/FindPike.cmake b/Modules/FindPike.cmake index 2750bc50cd..08eb3f4486 100644 --- a/Modules/FindPike.cmake +++ b/Modules/FindPike.cmake @@ -14,6 +14,16 @@ Finds the Pike compiler and interpreter: Pike is interpreted, general purpose, high-level, dynamic programming language. +Result Variables +^^^^^^^^^^^^^^^^ + +This module defines the following variables: + +``Pike_FOUND`` + .. versionadded:: 4.2 + + Boolean indicating whether Pike was found. + Cache Variables ^^^^^^^^^^^^^^^ @@ -46,3 +56,9 @@ mark_as_advanced( PIKE_EXECUTABLE PIKE_INCLUDE_PATH ) + +if(PIKE_EXECUTABLE AND PIKE_INCLUDE_PATH) + set(Pike_FOUND TRUE) +else() + set(Pike_FOUND FALSE) +endif() diff --git a/Modules/FindSelfPackers.cmake b/Modules/FindSelfPackers.cmake index 3742165ee0..d5355a532d 100644 --- a/Modules/FindSelfPackers.cmake +++ b/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 supports ``UPX``. +Result Variables +^^^^^^^^^^^^^^^^ + +This module defines the following variables: + +``SelfPackers_FOUND`` + .. versionadded:: 4.2 + + Boolean indicating whether packer tools were found. + Cache Variables ^^^^^^^^^^^^^^^ @@ -85,3 +95,9 @@ mark_as_advanced( SELF_PACKER_FOR_EXECUTABLE_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() diff --git a/Modules/FindTclStub.cmake b/Modules/FindTclStub.cmake index 7c8d52cbd8..cf57b9e392 100644 --- a/Modules/FindTclStub.cmake +++ b/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 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 ^^^^^^^^^^^^^^^ @@ -154,3 +164,9 @@ mark_as_advanced( TCL_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() diff --git a/Modules/FindUnixCommands.cmake b/Modules/FindUnixCommands.cmake index 40ae8b9bbb..add03270b9 100644 --- a/Modules/FindUnixCommands.cmake +++ b/Modules/FindUnixCommands.cmake @@ -9,15 +9,45 @@ FindUnixCommands Use :option:`${CMAKE_COMMAND} -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 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) diff --git a/Modules/FindWish.cmake b/Modules/FindWish.cmake index e0a0c1b5b8..7e9038f009 100644 --- a/Modules/FindWish.cmake +++ b/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 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 ^^^^^^^^^^^^^^^ @@ -100,3 +110,9 @@ find_program(TK_WISH ) mark_as_advanced(TK_WISH) + +if(TK_WISH) + set(Wish_FOUND TRUE) +else() + set(Wish_FOUND FALSE) +endif()