Fixed mingw build.

This commit is contained in:
James Goppert 2012-03-15 18:29:06 -04:00 committed by ThorstenB
parent b11c13fb9f
commit 619163d40e
4 changed files with 8 additions and 2 deletions

2
.gitignore vendored
View File

@ -12,5 +12,5 @@ CPackSourceConfig.cmake
cmake_uninstall.cmake cmake_uninstall.cmake
CTestTestfile.cmake CTestTestfile.cmake
install_manifest.txt install_manifest.txt
build build*
Build Build

View File

@ -201,6 +201,10 @@ endif(CMAKE_COMPILER_IS_GNUCXX)
if(WIN32) if(WIN32)
if(MINGW)
add_definitions(-D_WIN32_WINNT=0x501)
endif()
if(MSVC) if(MSVC)
# turn off various warnings # turn off various warnings
# foreach(warning 4244 4251 4267 4275 4290 4786 4305 4996) # foreach(warning 4244 4251 4267 4275 4290 4786 4305 4996)

View File

@ -9,7 +9,7 @@
#include <cstdlib> #include <cstdlib>
#include <cstdio> #include <cstdio>
#ifdef _MSC_VER #if defined _MSC_VER || defined _WIN32_WINNT
# define random rand # define random rand
#endif #endif

View File

@ -23,6 +23,8 @@
#endif #endif
#include <simgear/misc/sg_dir.hxx> #include <simgear/misc/sg_dir.hxx>
#include <math.h>
#include <stdlib.h>
#ifdef _WIN32 #ifdef _WIN32
# define WIN32_LEAN_AND_MEAN # define WIN32_LEAN_AND_MEAN