[aquaria] Enable Windows compiling

Pontos daemonpontos at gmail.com
Sat Jun 5 15:58:59 EDT 2010

Hi all!
I made the necessary changes to the CMake script and some of the source 
files to get the game to compile for Windows again. Tested with Mingw 
only, on both a native environment and in a cross-compile Linux 
environment (GCC 4.4.x).

I had to change the line CMAKE_MINIMUM_REQUIRED(VERSION 2.4), making it 
VERSION 2.6 instead.
The reason for this is that otherwise the script will generate a 
developer level warning related to backwards compatibility with CMake 
2.4, saying that the linker will try to link both fullpath libraries and 
also search for some libraries through flags (-lmingw32 and/or -mwindows 
in this case). That warning can be disabled with a policy setting in the 
script, but i think it's a better idea to change the version requirement 
of CMake instead.

Now, unrelated to Windows. Regarding what Jordi mentioned about the 
limits.h header, there is no need to add a new macro in cmakelists.txt 
given that BBGE_BUILD_UNIX already exists, is widely used, and does 
exactly the same thing you intended to achieve with the new macro.
So it would be a matter of simply adding the line #include 
<linux/limits.h> inside the first appearance of #ifdef BBGE_BUILD_UNIX

That's it :)

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: win.diff
URL: <http://icculus.org/pipermail/aquaria/attachments/20100605/42e990e9/attachment.diff>

More information about the aquaria mailing list