Added basic ability to find Matlab installations. Added test cpp file under modules/matlab/test to test mex compiler within cmake
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
# ----------------------------------------------------------------------------
|
||||
# CMake file for Matlab/Octave support
|
||||
# ----------------------------------------------------------------------------
|
||||
|
||||
# make sure we're on a supported architecture with Matlab installed
|
||||
if (IOS OR ANDROID OR NOT MATLAB_FOUND)
|
||||
ocv_module_disable(matlab)
|
||||
endif()
|
||||
|
||||
set(the_description "The Matlab/Octave bindings")
|
||||
ocv_add_module(matlab BINDINGS opencv_core opencv_imgproc
|
||||
OPTIONAL opencv_objdetect opencv_features2d opencv_video
|
||||
opencv_highgui opencv_ml opencv_calib3d opencv_photo
|
||||
opencv_nonfree opencv_calib)
|
||||
|
||||
add_subdirectory(test)
|
||||
|
8
modules/matlab/test/CMakeLists.txt
Normal file
8
modules/matlab/test/CMakeLists.txt
Normal file
@@ -0,0 +1,8 @@
|
||||
# glob the source files
|
||||
file(GLOB SOURCE_FILES *.cpp)
|
||||
|
||||
# compile each source
|
||||
foreach(SOURCE_FILE_ ${SOURCE_FILES})
|
||||
get_filename_component(SOURCE_FILE_NAME_ ${SOURCE_FILE_} NAME_WE)
|
||||
add_custom_target(${SOURCE_FILE_NAME_} ALL ${MATLAB_MEX_SCRIPT} ${SOURCE_FILE_})
|
||||
endforeach()
|
5
modules/matlab/test/test_compiler.cpp
Normal file
5
modules/matlab/test/test_compiler.cpp
Normal file
@@ -0,0 +1,5 @@
|
||||
#include <mex.h>
|
||||
|
||||
void mexFunction(int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]) {
|
||||
|
||||
}
|
Reference in New Issue
Block a user