Further clean up script and handle things better when MATLAB does exist.

This commit is contained in:
Ryan Curtin
2012-10-16 03:46:34 +00:00
parent c160302952
commit 7e5aee3cdb
+6 -5
View File
@@ -92,14 +92,15 @@ ELSE(WIN32)
ENDIF(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
ENDIF(WIN32)
IF(NOT "${MATLAB_MEX}" AND "${MatlabMex_FIND_REQUIRED}")
IF(NOT EXISTS "${MATLAB_MEX}" AND "${MatlabMex_FIND_REQUIRED}")
MESSAGE(FATAL_ERROR "Could not find MATLAB mex compiler; try specifying MATLAB_ROOT.")
ELSE(NOT "${MATLAB_MEX}" AND "${MatlabMex_FIND_REQUIRED}")
IF("${MATLAB_MEX}")
ELSE(NOT EXISTS "${MATLAB_MEX}" AND "${MatlabMex_FIND_REQUIRED}")
IF(EXISTS "${MATLAB_MEX}")
MESSAGE(STATUS "Found MATLAB mex compiler: ${MATLAB_MEX}")
MESSAGE(STATUS "MATLAB root: ${MATLAB_ROOT}")
ENDIF("${MATLAB_MEX}")
ENDIF(NOT "${MATLAB_MEX}" AND "${MatlabMex_FIND_REQUIRED}")
SET(MATLABMEX_FOUND 1)
ENDIF(EXISTS "${MATLAB_MEX}")
ENDIF(NOT EXISTS "${MATLAB_MEX}" AND "${MatlabMex_FIND_REQUIRED}")
MARK_AS_ADVANCED(
MATLAB_MEX