1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-10-15 20:46:37 +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 variables. Previous ``<PACKAGENAME>_VERSION_STRING`` result variables
are deprecated. 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 * The :module:`FindTIFF` module now provides a ``TIFF_VERSION`` result
variable. The ``TIFF_VERSION_STRING`` result variable is deprecated. variable. The ``TIFF_VERSION_STRING`` result variable is deprecated.

View File

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