mirror of
https://github.com/Kitware/CMake.git
synced 2026-08-05 07:10:26 +00:00
FindMatlab: Only consider versioned MCR subdirectory if it exists
Issue: #26306
This commit is contained in:
committed by
Brad King
parent
d31f4b645b
commit
cd4782bac3
@@ -636,11 +636,14 @@ function(matlab_get_all_valid_matlab_roots_from_registry matlab_versions matlab_
|
|||||||
string(REPLACE "." "" _matlab_current_version_without_dot "${_matlab_current_version}")
|
string(REPLACE "." "" _matlab_current_version_without_dot "${_matlab_current_version}")
|
||||||
|
|
||||||
if(IS_DIRECTORY "${current_MATLAB_ROOT}")
|
if(IS_DIRECTORY "${current_MATLAB_ROOT}")
|
||||||
|
if(IS_DIRECTORY "${current_MATLAB_ROOT}/v${_matlab_current_version_without_dot}")
|
||||||
|
cmake_path(APPEND current_MATLAB_ROOT "v${_matlab_current_version_without_dot}")
|
||||||
|
endif()
|
||||||
_Matlab_VersionInfoXML("${current_MATLAB_ROOT}" _matlab_version_tmp)
|
_Matlab_VersionInfoXML("${current_MATLAB_ROOT}" _matlab_version_tmp)
|
||||||
if("${_matlab_version_tmp}" STREQUAL "unknown")
|
if("${_matlab_version_tmp}" STREQUAL "unknown")
|
||||||
set(_matlab_version_tmp ${_matlab_current_version})
|
set(_matlab_version_tmp ${_matlab_current_version})
|
||||||
endif()
|
endif()
|
||||||
list(APPEND _matlab_roots_list "MCR" ${_matlab_version_tmp} "${current_MATLAB_ROOT}/v${_matlab_current_version_without_dot}")
|
list(APPEND _matlab_roots_list "MCR" ${_matlab_version_tmp} "${current_MATLAB_ROOT}")
|
||||||
endif()
|
endif()
|
||||||
endforeach()
|
endforeach()
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|||||||
Reference in New Issue
Block a user