Re: [Maya2osg-users] Problem with source groups in CMakeLists.txt for VC9
Status: Alpha
Brought to you by:
jtaibo
From: Javier T. <jav...@gm...> - 2011-05-13 15:33:30
|
Hi J-S, Yes, I tested it in Visual Studio 2010 Express, and it worked there. But I have to tweak a bit the filter option to make it work. It's a bit tricky. Right now I am in Ubuntu, so I cannot test it. But as soon as I get to a Windows machine, I'll test the file you sent and let you know how it behaves in VS 2010. And abusing of your generous CMake wisdom, there is one question I would like to ask you (I expect the list administrator don't get angry with me because of the off-topic, nor do the list members): I know how to make the debug targets link with debug libraries and release targets with release libraries. But, when I am using RelWithDebInfo, it considers it "optimized" and links it with the Release version (not the RelWithDebInfo). Is there any easy way (not populating the script with lots of conditionals and manually adding suffixes that are already defined) to make each target link with the corresponding ones? Thanks in advance. On Fri, May 13, 2011 at 3:31 PM, Jean-Sébastien Guay <jea...@cm...> wrote: > Hello Javier, > > Your recent change to put the GLSL/* files inside Source Files and Header > Files makes the generated .vcproj file unreadable in VC9 (2008). I think > it's actually a bug in CMake, but perhaps we could make a temp fix to work > around the problem? > > In case you're interested, the problem seems to be that CMake generates a > vcproj with two "Source Files" and two "Header Files" filters: > > <Filter Name="Source Files"> > <!-- ... the .cpp files directly in src/ --> > </Filter> > <Filter Name="Header Files"> > <!-- ... the .h files directly in src/ --> > </Filter> > <Filter Name="Source files"> > <Filter Name="GLSL"> > <!-- ... the .cpp files in src/GLSL --> > </Filter> > </Filter> > <Filter Name="Header files"> > <Filter Name="GLSL"> > <!-- ... the .h files in src/GLSL --> > </Filter> > </Filter> > > First I thought the problem was the case of the second "files" in both cases > (it's lowercase in the second filter), but changing it to uppercase in > CMakeLists.txt simply makes all files fall in Source Files or Header Files > (no GLSL sub-filters). > > So I think the problem is the two similarly-named filters, and that VC9 > doesn't like that. If I move the GLSL sub-filter inside the first "Source > Files" / "Header Files" filters in the vcproj file, it loads. So I think > that's what CMake should generate... > > I even tried with the latest CMake (2.8.4, I was on 2.8.3 before) and the > same problem still occurs. So I think I'll raise the issue with CMake, as it > seems to be a bug in the VC9 (and under) generators. > > In the mean time, if I make a filter for GLSL (both headers and source) when > the generator is for VC9 or under that would work. I assume you're using > VC10 and it's working for you obviously? > > Try the attached file, if for you on VC10 it gives the same result, it works > for me on VC9 so I think it would be a good workaround for now. > > What do you think? Thanks in advance, > > J-S > -- > ______________________________________________________ > Jean-Sebastien Guay jea...@cm... > http://www.cm-labs.com/ > http://whitestar02.dyndns-web.com/ > > ------------------------------------------------------------------------------ > Achieve unprecedented app performance and reliability > What every C/C++ and Fortran developer should know. > Learn how Intel has extended the reach of its next-generation tools > to help boost performance applications - inlcuding clusters. > http://p.sf.net/sfu/intel-dev2devmay > _______________________________________________ > Maya2osg-users mailing list > May...@li... > https://lists.sourceforge.net/lists/listinfo/maya2osg-users > > -- Javier Taibo |