[CMake] Cmake + Matlab mex

2006-10-16 Thread Wojciech Jarosz
I saw a couple questions regarding this in the archives from a few years, but no answers. I am using CMake for my project, and would now like to write a matlab mex function which would use my C/C++ code base. I'd like to have the CMake infrastructure figure out the correct -I,-L,-l flags to pa

Re: [CMake] Cmake + Matlab mex

2009-07-09 Thread Matt McCormick
> ..., but what I want to do is compile a file > for use in Matlab using the mex compiler. I can do this by hand by > executing the following in a shell: > > $ mex foo.cpp > > This would produce a foo.mexglx binary which matlab would be able to use. > > This is great if your foo.cpp is self-co

Re: [CMake] Cmake + Matlab mex

2006-10-16 Thread Brad King
Wojciech Jarosz wrote: > I saw a couple questions regarding this in the archives from a few > years, but no answers. > > I am using CMake for my project, and would now like to write a matlab > mex function which would use my C/C++ code base. I'd like to have the > CMake infrastructure figure out t

Re: [CMake] Cmake + Matlab mex

2006-10-16 Thread Wojciech Jarosz
Brad King wrote: FIND_PACKAGE(Matlab) INCLUDE_DIRECTORIES(${MATLAB_INCLUDE_DIR}) ADD_LIBRARY(mymex MODULE mymex.c) TARGET_LINK_LIBRARIES(mymex ${MATLAB_LIBRARIES}) See also "bin/cmake --help-module FindMatlab". It looks like the matlab module is a bit out of date so let us know if you have prob