[Cmake] SET_MSPROJECT_TEMPLATES_DIRECTORY( something )

Geoffrey Cross geoff at robots.ox.ac.uk
Tue Dec 11 04:59:27 EST 2001



A while ago (probably about 6 months), I wrote a Cmake command which
basically set the directory from which the DS[WP]-generators pull
templates (which defaults to ${CMAKE_SOURCE_DIR}/Templates).  This was a
(necessary) hack, because back in those days it was not possible to set
flags such as the Use_MFC flag from within Cmake itself, and
understandably Bill didn't want to put in too many special-case commands
to allow for such things.

A lot of these problems have subsequently been solved (for instance, the
CMAKE_MFC_FLAG variable was introduced), and someone decided that my
command was no long necessary (and I think I agree in most cases).
However, over the last week I have come across another case (if anyone
is interested, this is to generate a DLL which can be loaded from within
matlab) where I think I am going to need the ability to completely
change the DSP template from within a CMakeLists file.  I realize that
in the long run, a lot of the functionality I am asking for is going to
be available using more Cmake-compliant type approaches, but I strongly
believe that Cmake is currently very seriously limited by the fact that
one can't redefine the DSP structure arbitrarily.

In case anyone things they can solve this another way, I've enclosed a
sample DSP[1].  If not, I would propose that my command is re-introduced
for the foreseeable future...

Geoff.

[1] The important lines (which currently aren't possible) are things
like:

# ADD LINK32 ... /export:mexFunction

...

PreLink_Cmds=lib /def:"c:\geoff\pkg\matlab\extern\include\libmat.def"
/machine:ix86           /OUT:mexlib.lib


-------------- next part --------------
A non-text attachment was scrubbed...
Name: code.dsp
Type: application/octet-stream
Size: 4718 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/cmake/attachments/20011211/97e8d20e/attachment.obj>


More information about the CMake mailing list