1 ############################################################################## 2 # @file BASISConfigVersion.cmake 3 # @brief Package configuration version file. 5 # @note The BASISConfigVersion.cmake file is automatically 6 # generated by BASIS from the template file ConfigVersion.cmake.in 7 # which is part of BASIS. 9 # This file supports the usage of the package by other projects. It is loaded 10 # by the find_package() CMake command used by other projects to find this 11 # package in order to verify that the version of the package found is 12 # compatible with the version requested. 14 # @par Input variables 17 # @tp @b PACKAGE_FIND_NAME @endtp 18 # <td>The package name, i.e., "BASIS".</td> 21 # @tp @b BASIS_FIND_VERSION @endtp 22 # <td>Full requested version string.</td> 25 # @tp @b BASIS_FIND_VERSION_MAJOR @endtp 26 # <td>Major version if requested, else 0.</td> 29 # @tp @b BASIS_FIND_VERSION_MINOR @endtp 30 # <td>Minor version if requested, else 0.</td> 33 # @tp @b BASIS_FIND_VERSION_PATCH @endtp 34 # <td>Patch version if requested, else 0.</td> 37 # @tp @b BASIS_FIND_VERSION_TWEAK @endtp 38 # <td>Tweak version if requested, else 0.</td> 41 # @tp @b BASIS_FIND_VERSION_COUNT @endtp 42 # <td>Number of version components, 0 to 4.</td> 46 # @par Output variables 49 # @tp @b PACKAGE_VERSION @endtp 50 # <td>Full provided version string.</td> 53 # @tp @b PACKAGE_VERSION_EXACT @endtp 54 # <td>True if version is exact match.</td> 57 # @tp @b PACKAGE_VERSION_COMPATIBLE @endtp 58 # <td>True if version is compatible.</td> 61 # @tp @b PACKAGE_VERSION_UNSUITABLE @endtp 62 # <td>True if unsuitable as any version.</td> 66 # @sa http://www.cmake.org/Wiki/CMake_2.6_Notes 68 # @ingroup BasisConfig 69 ############################################################################## 71 # ============================================================================ 73 # ============================================================================ 75 ## @brief Version of the found package. 78 # ============================================================================
80 # ============================================================================
82 # Perform compatibility check here
using the input CMake variables.
83 # See example in http:
85 ## @brief Whether
this package version
is compatible with the requested version.
87 ## @brief Whether this package version is unsuitable with the requested version. 90 ## @brief Whether
this package version
is the requested version.
91 if (${PACKAGE_FIND_VERSION_MAJOR} EQUAL 3)
92 if (${PACKAGE_FIND_VERSION_MINOR} EQUAL 3)
cmake PACKAGE_VERSION
Version of the found package.
cmake PACKAGE_VERSION_UNSUITABLE
Whether this package version is unsuitable with the requested version.
function is(in result, in expected, in name)
Test whether a given result is equal to the expected result.
cmake PACKAGE_VERSION_EXACT
Whether this package version is the requested version.
cmake PACKAGE_VERSION_COMPATIBLE
Whether this package version is compatible with the requested version.