mirror of
https://github.com/Kitware/CMake.git
synced 2025-12-30 18:29:37 -06:00
FindMatlab: follow CMP0074 <PackageName>_ROOT search behavior
This commit is contained in:
committed by
Brad King
parent
ba74c58ca4
commit
72dd680609
@@ -85,10 +85,18 @@ Module Input Variables
|
||||
Users or projects may set the following variables to configure the module
|
||||
behavior:
|
||||
|
||||
:variable:`Matlab_ROOT <<PackageName>_ROOT>`
|
||||
.. versionadded:: 3.25
|
||||
|
||||
Default value for :variable:`Matlab_ROOT_DIR`, the root of the Matlab
|
||||
installation.
|
||||
|
||||
:variable:`Matlab_ROOT_DIR`
|
||||
the root of the Matlab installation.
|
||||
The root of the Matlab installation.
|
||||
|
||||
:variable:`MATLAB_FIND_DEBUG`
|
||||
outputs debug information
|
||||
|
||||
:variable:`MATLAB_ADDITIONAL_VERSIONS`
|
||||
additional versions of Matlab for the automatic retrieval of the installed
|
||||
versions.
|
||||
@@ -1581,6 +1589,13 @@ endfunction()
|
||||
# this variable will get all Matlab installations found in the current system.
|
||||
set(_matlab_possible_roots)
|
||||
|
||||
if(NOT DEFINED Matlab_ROOT AND DEFINED ENV{Matlab_ROOT})
|
||||
set(Matlab_ROOT $ENV{Matlab_ROOT})
|
||||
endif()
|
||||
if(DEFINED Matlab_ROOT)
|
||||
set(Matlab_ROOT_DIR ${Matlab_ROOT})
|
||||
endif()
|
||||
|
||||
if(Matlab_ROOT_DIR)
|
||||
# if the user specifies a possible root, we keep this one
|
||||
|
||||
|
||||
Reference in New Issue
Block a user