Mentions légales du service

Skip to content
Snippets Groups Projects
Commit b078abf7 authored by hhakim's avatar hhakim
Browse files

Fix bug affecting MATLAB_ROOT path separator when using MinGW or gcc on Windows.

parent 8cecb7db
No related branches found
No related tags found
No related merge requests found
......@@ -169,8 +169,11 @@ if( ${MATLAB_DIR_TMP} MATCHES "matlab")
elseif(WIN32)
string(REGEX REPLACE "([a-zA-Z0-9_\\:.]+)\\\\bin\\\\matlab.exe" "\\1" MATLAB_ROOT "${MATLAB_DIR_TMP}")
if(${CMAKE_GENERATOR} MATCHES "MinGW Makefiles")
string(REGEX REPLACE "\\\\" "/" MATLAB_ROOT ${MATLAB_ROOT}) # replacing \ chars (win. separator) by / to avoid error with path in makefile later (typically: C:\MATLAB could become C:MATLAB)
endif()
else()
message(WARNING "Unknown type of plateform for matlab")
message(WARNING "Unknown type of plateform for matlab")
endif()
set(MATLAB_ROOT ${MATLAB_ROOT} CACHE PATH "Matlab root directory")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment