转自:http://cn.mathworks.com/matlabcentral/fileexchange/45522-mex-cmake?requestedDomain=www.mathworks.com Instead of compiling MEX in command line within Matlab, an alternative way is to use CMake tools. Using CMake could be advantageous for building large MEX project or building MEX with lots of ext