summaryrefslogtreecommitdiffstats
path: root/Modules/FindMatlab.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/FindMatlab.cmake')
-rw-r--r--Modules/FindMatlab.cmake74
1 files changed, 37 insertions, 37 deletions
diff --git a/Modules/FindMatlab.cmake b/Modules/FindMatlab.cmake
index 1cdb071..20dc1da 100644
--- a/Modules/FindMatlab.cmake
+++ b/Modules/FindMatlab.cmake
@@ -19,75 +19,75 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-SET(MATLAB_FOUND 0)
-IF(WIN32)
- IF(${CMAKE_GENERATOR} MATCHES "Visual Studio 6")
- SET(MATLAB_ROOT "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MathWorks\\MATLAB\\7.0;MATLABROOT]/extern/lib/win32/microsoft/msvc60")
- ELSE(${CMAKE_GENERATOR} MATCHES "Visual Studio 6")
- IF(${CMAKE_GENERATOR} MATCHES "Visual Studio 7")
+set(MATLAB_FOUND 0)
+if(WIN32)
+ if(${CMAKE_GENERATOR} MATCHES "Visual Studio 6")
+ set(MATLAB_ROOT "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MathWorks\\MATLAB\\7.0;MATLABROOT]/extern/lib/win32/microsoft/msvc60")
+ else(${CMAKE_GENERATOR} MATCHES "Visual Studio 6")
+ if(${CMAKE_GENERATOR} MATCHES "Visual Studio 7")
# Assume people are generally using 7.1,
# if using 7.0 need to link to: ../extern/lib/win32/microsoft/msvc70
- SET(MATLAB_ROOT "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MathWorks\\MATLAB\\7.0;MATLABROOT]/extern/lib/win32/microsoft/msvc71")
- ELSE(${CMAKE_GENERATOR} MATCHES "Visual Studio 7")
- IF(${CMAKE_GENERATOR} MATCHES "Borland")
+ set(MATLAB_ROOT "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MathWorks\\MATLAB\\7.0;MATLABROOT]/extern/lib/win32/microsoft/msvc71")
+ else(${CMAKE_GENERATOR} MATCHES "Visual Studio 7")
+ if(${CMAKE_GENERATOR} MATCHES "Borland")
# Same here, there are also: bcc50 and bcc51 directories
- SET(MATLAB_ROOT "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MathWorks\\MATLAB\\7.0;MATLABROOT]/extern/lib/win32/microsoft/bcc54")
- ELSE(${CMAKE_GENERATOR} MATCHES "Borland")
- IF(MATLAB_FIND_REQUIRED)
- MESSAGE(FATAL_ERROR "Generator not compatible: ${CMAKE_GENERATOR}")
- ENDIF(MATLAB_FIND_REQUIRED)
- ENDIF(${CMAKE_GENERATOR} MATCHES "Borland")
- ENDIF(${CMAKE_GENERATOR} MATCHES "Visual Studio 7")
- ENDIF(${CMAKE_GENERATOR} MATCHES "Visual Studio 6")
- FIND_LIBRARY(MATLAB_MEX_LIBRARY
+ set(MATLAB_ROOT "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MathWorks\\MATLAB\\7.0;MATLABROOT]/extern/lib/win32/microsoft/bcc54")
+ else(${CMAKE_GENERATOR} MATCHES "Borland")
+ if(MATLAB_FIND_REQUIRED)
+ message(FATAL_ERROR "Generator not compatible: ${CMAKE_GENERATOR}")
+ endif(MATLAB_FIND_REQUIRED)
+ endif(${CMAKE_GENERATOR} MATCHES "Borland")
+ endif(${CMAKE_GENERATOR} MATCHES "Visual Studio 7")
+ endif(${CMAKE_GENERATOR} MATCHES "Visual Studio 6")
+ find_library(MATLAB_MEX_LIBRARY
libmex
${MATLAB_ROOT}
)
- FIND_LIBRARY(MATLAB_MX_LIBRARY
+ find_library(MATLAB_MX_LIBRARY
libmx
${MATLAB_ROOT}
)
- FIND_LIBRARY(MATLAB_ENG_LIBRARY
+ find_library(MATLAB_ENG_LIBRARY
libeng
${MATLAB_ROOT}
)
- FIND_PATH(MATLAB_INCLUDE_DIR
+ find_path(MATLAB_INCLUDE_DIR
"mex.h"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\MathWorks\\MATLAB\\7.0;MATLABROOT]/extern/include"
)
-ELSE( WIN32 )
- IF(CMAKE_SIZEOF_VOID_P EQUAL 4)
+else( WIN32 )
+ if(CMAKE_SIZEOF_VOID_P EQUAL 4)
# Regular x86
- SET(MATLAB_ROOT
+ set(MATLAB_ROOT
/usr/local/matlab-7sp1/bin/glnx86/
/opt/matlab-7sp1/bin/glnx86/
$ENV{HOME}/matlab-7sp1/bin/glnx86/
$ENV{HOME}/redhat-matlab/bin/glnx86/
)
- ELSE(CMAKE_SIZEOF_VOID_P EQUAL 4)
+ else(CMAKE_SIZEOF_VOID_P EQUAL 4)
# AMD64:
- SET(MATLAB_ROOT
+ set(MATLAB_ROOT
/usr/local/matlab-7sp1/bin/glnxa64/
/opt/matlab-7sp1/bin/glnxa64/
$ENV{HOME}/matlab7_64/bin/glnxa64/
$ENV{HOME}/matlab-7sp1/bin/glnxa64/
$ENV{HOME}/redhat-matlab/bin/glnxa64/
)
- ENDIF(CMAKE_SIZEOF_VOID_P EQUAL 4)
- FIND_LIBRARY(MATLAB_MEX_LIBRARY
+ endif(CMAKE_SIZEOF_VOID_P EQUAL 4)
+ find_library(MATLAB_MEX_LIBRARY
mex
${MATLAB_ROOT}
)
- FIND_LIBRARY(MATLAB_MX_LIBRARY
+ find_library(MATLAB_MX_LIBRARY
mx
${MATLAB_ROOT}
)
- FIND_LIBRARY(MATLAB_ENG_LIBRARY
+ find_library(MATLAB_ENG_LIBRARY
eng
${MATLAB_ROOT}
)
- FIND_PATH(MATLAB_INCLUDE_DIR
+ find_path(MATLAB_INCLUDE_DIR
"mex.h"
"/usr/local/matlab-7sp1/extern/include/"
"/opt/matlab-7sp1/extern/include/"
@@ -95,20 +95,20 @@ ELSE( WIN32 )
"$ENV{HOME}/redhat-matlab/extern/include/"
)
-ENDIF(WIN32)
+endif(WIN32)
# This is common to UNIX and Win32:
-SET(MATLAB_LIBRARIES
+set(MATLAB_LIBRARIES
${MATLAB_MEX_LIBRARY}
${MATLAB_MX_LIBRARY}
${MATLAB_ENG_LIBRARY}
)
-IF(MATLAB_INCLUDE_DIR AND MATLAB_LIBRARIES)
- SET(MATLAB_FOUND 1)
-ENDIF(MATLAB_INCLUDE_DIR AND MATLAB_LIBRARIES)
+if(MATLAB_INCLUDE_DIR AND MATLAB_LIBRARIES)
+ set(MATLAB_FOUND 1)
+endif(MATLAB_INCLUDE_DIR AND MATLAB_LIBRARIES)
-MARK_AS_ADVANCED(
+mark_as_advanced(
MATLAB_LIBRARIES
MATLAB_MEX_LIBRARY
MATLAB_MX_LIBRARY