1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-10-14 02:08:27 +08:00

Merge topic 'patch-FindSquish-version'

ca52983884 FindSquish: Add Squish_VERSION

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11041
This commit is contained in:
Brad King
2025-08-08 13:26:04 +00:00
committed by Kitware Robot
2 changed files with 57 additions and 22 deletions

View File

@@ -66,5 +66,10 @@ Find Modules
variables. Previous ``<PACKAGENAME>_VERSION_STRING`` result variables
are deprecated.
* The :module:`FindSquish` module now provides a ``Squish_VERSION`` result
variable. The ``SQUISH_VERSION``, ``SQUISH_VERSION_MAJOR``,
``SQUISH_VERSION_MINOR``, and ``SQUISH_VERSION_PATCH`` result variables
are deprecated.
* The :module:`FindTIFF` module now provides a ``TIFF_VERSION`` result
variable. The ``TIFF_VERSION_STRING`` result variable is deprecated.

View File

@@ -5,9 +5,15 @@
FindSquish
----------
Finds Squish, a cross-platform automated GUI testing framework for applications
built on various GUI technologies. Squish supports testing of both native and
cross-platform toolkits, such as Qt, Java, and Tk.
Finds Squish, a cross-platform automated GUI testing framework for
applications built on various GUI technologies:
.. code-block:: cmake
find_package(Squish [<version>] [...])
Squish supports testing of both native and cross-platform toolkits, such as
Qt, Java, and Tk.
Result Variables
^^^^^^^^^^^^^^^^
@@ -15,22 +21,15 @@ Result Variables
This module defines the following variables:
``Squish_FOUND``
Boolean indicating whether the (requested version of) Squish is found. For
backward compatibility, the ``SQUISH_FOUND`` variable is also set to the same
value.
Boolean indicating whether (the requested version of) Squish is found.
For backward compatibility, the ``SQUISH_FOUND`` variable is also set to
the same value.
``Squish_VERSION``
.. versionadded:: 4.2
``SQUISH_VERSION``
The full version of the Squish found.
``SQUISH_VERSION_MAJOR``
The major version of the Squish found.
``SQUISH_VERSION_MINOR``
The minor version of the Squish found.
``SQUISH_VERSION_PATCH``
The patch version of the Squish found.
``SQUISH_INSTALL_DIR_FOUND``
Boolean indicating whether the Squish installation directory is found.
@@ -162,6 +161,35 @@ This module provides the following commands, if Squish is found:
A string of one or more (semicolon-separated list) test wrappers needed by
the test case.
Deprecated Variables
^^^^^^^^^^^^^^^^^^^^
The following variables are provided for backward compatibility:
``SQUISH_VERSION``
.. deprecated:: 4.2
Superseded by the ``Squish_VERSION``.
The full version of the Squish found.
``SQUISH_VERSION_MAJOR``
.. deprecated:: 4.2
Superseded by the ``Squish_VERSION``.
The major version of the Squish found.
``SQUISH_VERSION_MINOR``
.. deprecated:: 4.2
Superseded by the ``Squish_VERSION``.
The minor version of the Squish found.
``SQUISH_VERSION_PATCH``
.. deprecated:: 4.2
Superseded by the ``Squish_VERSION``.
The patch version of the Squish found.
Examples
^^^^^^^^
@@ -254,10 +282,11 @@ else()
endif()
set(SQUISH_VERSION)
set(SQUISH_VERSION_MAJOR)
set(SQUISH_VERSION_MINOR)
set(SQUISH_VERSION_PATCH)
unset(Squish_VERSION)
unset(SQUISH_VERSION)
unset(SQUISH_VERSION_MAJOR)
unset(SQUISH_VERSION_MINOR)
unset(SQUISH_VERSION_PATCH)
# record if executables are set
if(SQUISH_CLIENT_EXECUTABLE)
@@ -269,7 +298,8 @@ if(SQUISH_CLIENT_EXECUTABLE)
set(SQUISH_VERSION_MAJOR "${CMAKE_MATCH_1}")
set(SQUISH_VERSION_MINOR "${CMAKE_MATCH_2}")
set(SQUISH_VERSION_PATCH "${CMAKE_MATCH_3}")
set(SQUISH_VERSION "${SQUISH_VERSION_MAJOR}.${SQUISH_VERSION_MINOR}.${SQUISH_VERSION_PATCH}" )
set(Squish_VERSION "${SQUISH_VERSION_MAJOR}.${SQUISH_VERSION_MINOR}.${SQUISH_VERSION_PATCH}" )
set(SQUISH_VERSION "${Squish_VERSION}")
endif()
else()
set(SQUISH_CLIENT_EXECUTABLE_FOUND 0)
@@ -284,7 +314,7 @@ endif()
# record if Squish was found
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Squish REQUIRED_VARS SQUISH_INSTALL_DIR SQUISH_CLIENT_EXECUTABLE SQUISH_SERVER_EXECUTABLE
VERSION_VAR SQUISH_VERSION )
VERSION_VAR Squish_VERSION)
set(_SQUISH_MODULE_DIR "${CMAKE_CURRENT_LIST_DIR}")