diff options
author | scivision <scivision@users.noreply.github.com> | 2023-03-03 22:01:15 (GMT) |
---|---|---|
committer | scivision <scivision@users.noreply.github.com> | 2023-03-07 20:32:56 (GMT) |
commit | 257a3e870ea96a861752ff3ffff9481dfa4a4577 (patch) | |
tree | a9c210e9c44a85028efbc394c919a8921909afbc /Modules | |
parent | 3d6075da4df6a4f93a835e446c2bbf29488f50bd (diff) | |
download | CMake-257a3e870ea96a861752ff3ffff9481dfa4a4577.zip CMake-257a3e870ea96a861752ff3ffff9481dfa4a4577.tar.gz CMake-257a3e870ea96a861752ff3ffff9481dfa4a4577.tar.bz2 |
FindMatlab: add Matlab_VERSION and document.
fixes #24569
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/FindMatlab.cmake | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/Modules/FindMatlab.cmake b/Modules/FindMatlab.cmake index 0f1e451..fa8ee5a 100644 --- a/Modules/FindMatlab.cmake +++ b/Modules/FindMatlab.cmake @@ -137,6 +137,12 @@ Result variables ``Matlab_FOUND`` ``TRUE`` if the Matlab installation is found, ``FALSE`` otherwise. All variable below are defined if Matlab is found. +``Matlab_VERSION`` + .. versionadded:: 3.27 + + the numerical version (e.g. 9.13) of Matlab found. Not to be confused with + Matlab release name (e.g. R2022b) that can be obtained with + :command:`matlab_get_release_name_from_version`. ``Matlab_ROOT_DIR`` the final root of the Matlab installation determined by the FindMatlab module. @@ -2020,11 +2026,13 @@ _Matlab_add_imported_target(MAT mat) _Matlab_add_imported_target(ENGINE MatlabEngine) _Matlab_add_imported_target(DATAARRAY MatlabDataArray) +set(Matlab_VERSION ${Matlab_VERSION_STRING}) + find_package_handle_standard_args( Matlab FOUND_VAR Matlab_FOUND REQUIRED_VARS ${_matlab_required_variables} - VERSION_VAR Matlab_VERSION_STRING + VERSION_VAR Matlab_VERSION HANDLE_COMPONENTS) unset(_matlab_required_variables) |