[CMake] Project with .NET Formular (Header with resx)

David Cole david.cole at kitware.com
Tue Jul 5 07:28:00 EDT 2011


A .NET Forms -based, managed C++ project is certainly not the typical output
of a CMake project.

CMake is largely focused on cross-platform C++ projects. Believe it or not,
you may be the first to attempt to do this and expect it to work...

If this is just a piece of a larger project, you could certainly use Visual
Studio to build an existing *.vcproj file, either via the
include_external_msproject command or via CMake's ExternalProject module.


http://www.cmake.org/cmake/help/cmake-2-8-docs.html#command:include_external_msproject

  http://www.cmake.org/cmake/help/cmake-2-8-docs.html#module:ExternalProject


HTH,
David


On Sat, Jul 2, 2011 at 10:43 AM, Simon Adler <cmake at cg-effects.de> wrote:

> I tried some more.
> I changed the Headers in the VS2008 Project (generated by cmake)
> manually to type Header-Formula.
> I tried to enter the Form-Designer with a double-Click on a Form, but
> VS2008 showed me that the form is now corrupt. So i have to alter my
> question:
>
> Is it even possible to generate a cmake Projekt using .NET Forms?
>
> Greetings
>
> Simon
>
>
>
> On Sat, Jul 2, 2011 at 1:01 PM, Simon Adler <cmake at cg-effects.de> wrote:
> > Hello Mailing List
> >
> > i am quite new to CMake. I have a project i originally build with
> > visual studio 2008.
> > I try to create a cmake Projekt so i can use cmake in the future.
> > I am using .NET Forms which are Headers with associated resx files. In
> > Visual-Studio the only
> > difference between Headers and Forms are that the FileType differs (In
> > the propierties)
> >
> > How can I change this for a header via cmake?
> >
> > # find header in current folder
> > file (GLOB  fhead "*.h")
> > foreach ( filename ${fhead} )
> >        GET_FILENAME_COMPONENT( filepath ${filename} PATH )
> >        GET_FILENAME_COMPONENT( filebase ${filename} NAME_WE )
> >        SET(Source "${filepath}/${filebase}.cpp")
> >        SET(Res    "${filepath}/${filebase}.resx")
> >        if (EXISTS ${Res}) # a resx exists, so it IS a form
> >                SET(FormHeader ${FormHeader} ${filename})
> >                if (EXISTS ${Source}) # there is an additional
> implementation file
> >                     SET(FormSource ${FormSource} ${Source})
> >                endif (EXISTS ${Source})
> >        endif (EXISTS ${Res})
> > endforeach ( filename )
> >
> > With this code i got the forms how i expect it, but every header is
> > just a Header and not
> > konwn as formular to visual studio
> >
> > Hope some may give me a hint.
> >
> > Thank you very much
> >
> > Simon
> >
> _______________________________________________
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20110705/40f264a0/attachment.htm>


More information about the CMake mailing list