> ..., 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-contained, however my foo.cpp > depends on libraries and include files which I generate in my CMake > build. Manually what I would do to handle this is: > > $ mex -I/my/include/path -L/my/library/path -lmylib ... foo.cpp > > I would like to make a CMake target which does the command above, taking > into account any library or include dependencies I specify in my > CMakeLists.txt. Is this possible? >
I have implemented this behavior. Please see http://www.cmake.org/Wiki/CMake:MatlabMex Kick the tires. I have tried this on Linux and WindowsXP, and it seems works in these cases, at least on my system. _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake