[CMake] Having design issues implementing Xbox360 Generator support

David Genest david.genest at ubisoft.com
Tue Jan 19 15:39:33 EST 2010


> XBox is x86, right ?

No, it is a Power architecture (PowerPC). But the builds can all be made seamlessly from visual studio.

> Is this cross compiling, in other words, can executables for the XBox
> be
> executed on the development host ?

You cannot execute binaries in the development environment; it needs to be copied first to the development console. In a sense it is cross compiling, but managed by Visual Studio. So I don't think it quite fits the cross compiling philosophy of cmake.

> I haven't read the remainder of your mail closely, but I think you have
> quite
> similar issues to the ones encountered for supporting Windows CE:
> http://public.kitware.com/Bug/view.php?id=7919

I have read the issue. 

The issue poster seemingly had similar problems with the CMAKE_C_STANDARD_LIBRARIES_INIT because he modified it in the presence of a WINCE variable. If I may, I think that windows-cl.cmake is making too much assumptions about what it will build.

Also, the issue talks about nmake generator, and I have not implemented that yet. I am not yet sure if it is possible.

> This is currently not progressing because of the way how to find out
> the
> architecture of the most simple program the given compiler has built.

Correct me if I'm wrong, but in the case of a Xbox 360 build, I think it is sufficient to hard-code the architecture in the generator because the development tools and tool chain are closed and very well integrated with the Visual Studio environment. I would guess that the WinCE generator could make the same assumptions. I am not aware of any way to build for an xbox 360 without visual studio. Of course, this does not help with the problem of finding out the architecture. 

> Can you please check if this is the same issue as yours with the
> Windows-cl-Xbox360.cmake file ?

The implementation route that the issue poster took is quite similar to mine, but he seems to hardcode more variables. He also sets the CMAKE_SYSTEM_NAME var (to WinCE in his case). The patches submitted are in a kind of a mess. I think that he had the same issues, because windows-cl.cmake unconditionally sets flags that will override what the platform may have set.

> Alex


More information about the CMake mailing list