[Cmake] SET_MSPROJECT_TEMPLATES_DIRECTORY( something )

William A. Hoffman bill.hoffman at kitware.com
Tue Dec 11 08:30:05 EST 2001


Your command was never a command, and it is still there.
You simply set this variable in cmake:
MSPROJECT_TEMPLATE_DIRECTORY
and cmake will use a different template directory.

You can however use .def files in cmake.

We use it when building zlib.def:

   SOURCE_FILES(MEX_SRCS  c:\geoff\pkg\matlab\extern\include\libmat.def  )

You could  put the /export:mexFunction in the .def file. and you would have the
same result without a separate template directory.




-Bill

At 09:59 AM 12/11/2001 +0000, Geoffrey Cross wrote:


>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
>
>




More information about the CMake mailing list