On Wed, Jul 1, 2009 at 4:34 PM, Robert Dailey <rcdai...@gmail.com> wrote:

> Hi,
> If I have the following CMakeLists.txt:
>
> cmake_minimum_required( VERSION 2.6.4 )
>
> project( project1 )
> add_executable( project1 source1.cpp )
>
> project( project2 )
> add_executable( project2 source2.cpp )
>
> project( project3 )
> add_executable( project3 source3.cpp )
>
> If I create visual studio 2008 files with this, I end up getting the
> following project files:
>
> project1.vcproj
> project2.vcproj
> project3.vcproj
> project3.sln
>
> The problem here is that I want the SLN file to be named project1.sln
> (after the first call to project() ). Is there a way I can tell CMake which
> call to project() in the same directory will generate the "master" project
> file? Note that if I add a dummy project to the end of the file:
>
> project( foo )
>
> I get:
> project1.vcproj
> project2.vcproj
> project3.vcproj
> foo.sln
>
> So it gives me some limited control over the naming, but it isn't ideal.
>
>
I typically only do one project in my setups, and I name the project what I
want to show up in VS.  I then have lots of add_executables and other
targets that show up as "projects" in the VS solution.  I'm not sure what
you are trying to gain by having lots of project() calls.

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

Reply via email to