[CMake] Building both make files and visual studio files.
Josef Karthauser
joe.karthauser at geomerics.com
Mon Oct 1 10:27:32 EDT 2007
To address this issue I had to patch the cmake source files like this:
if(this->PlatformName == "XBox 360")
{
aCompilerTool = "VCCLX360CompilerTool";
}
else
{
aCompilerTool = "VCCLCompilerTool";
}
Hopefully for us, the XBox 360 is the only platform that needs this modification. The PS3 has a custom tool but it can be ignored since it relies on settings of the default tools.
How do you go about setting the platformname from within the CMakeLists.txt? I had a look at the code, but concluded that it wasn't configurable. Is that another local hack?
There is another issue, the platform names in SLN files can have 2 different names:
-one condensed name without any spaces
-one full length name
So you can encounter this kind of line :
{F064F4EF-CE8A-4613-885E-3E80C6683EF9}.runtime|XBox360.Build.0 = runtime|Xbox 360
To address this we had to add a "Real name" member to the global generator and set this real name in our top level CMakeLists.txt.
Hmm, yes, it's a pain. I think I'm still inclined to do it in make files for this reason. I suspect I'll try adding another local make generator for makefile type projects, and get them produced in a separate run of cmake, as you originally suggested.
Joe
More information about the CMake
mailing list