From 3434c22c290887a47bd70d6315aba8082a77110a Mon Sep 17 00:00:00 2001 From: Julien Schueller Date: Wed, 1 Aug 2018 07:40:25 -0400 Subject: FindMatlab: only search registry on windows hosts From Linux, it fails when cross-compiling --- Modules/FindMatlab.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/FindMatlab.cmake b/Modules/FindMatlab.cmake index 54e62db..ddf22d1 100644 --- a/Modules/FindMatlab.cmake +++ b/Modules/FindMatlab.cmake @@ -1369,7 +1369,7 @@ else() # if the user does not specify the possible installation root, we look for # one installation using the appropriate heuristics. # There is apparently no standard way on Linux. - if(WIN32) + if(CMAKE_HOST_WIN32) _Matlab_find_instances_win32(_matlab_possible_roots_win32) list(APPEND _matlab_possible_roots ${_matlab_possible_roots_win32}) elseif(APPLE) -- cgit v0.12