[Maya2osg-users] Problem with source groups in CMakeLists.txt for VC9
Status: Alpha
Brought to you by:
jtaibo
From: Jean-Sébastien G. <jea...@cm...> - 2011-05-13 13:31:50
|
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/ |