From: James Goppert Date: Thu, 15 Mar 2012 22:29:06 +0000 (-0400) Subject: Fixed mingw build. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=619163d40e6beeaf08759944d80256692395ec9e;p=simgear.git Fixed mingw build. --- diff --git a/.gitignore b/.gitignore index e681133a..2a207a99 100644 --- a/.gitignore +++ b/.gitignore @@ -12,5 +12,5 @@ CPackSourceConfig.cmake cmake_uninstall.cmake CTestTestfile.cmake install_manifest.txt -build +build* Build diff --git a/CMakeLists.txt b/CMakeLists.txt index 281b366f..4b3c0e10 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -201,6 +201,10 @@ endif(CMAKE_COMPILER_IS_GNUCXX) if(WIN32) + if(MINGW) + add_definitions(-D_WIN32_WINNT=0x501) + endif() + if(MSVC) # turn off various warnings # foreach(warning 4244 4251 4267 4275 4290 4786 4305 4996) diff --git a/simgear/io/test_binobj.cxx b/simgear/io/test_binobj.cxx index 50d60913..2ca1edf1 100644 --- a/simgear/io/test_binobj.cxx +++ b/simgear/io/test_binobj.cxx @@ -9,7 +9,7 @@ #include #include -#ifdef _MSC_VER +#if defined _MSC_VER || defined _WIN32_WINNT # define random rand #endif diff --git a/simgear/misc/sg_dir.cxx b/simgear/misc/sg_dir.cxx index a9969e07..7d26025b 100644 --- a/simgear/misc/sg_dir.cxx +++ b/simgear/misc/sg_dir.cxx @@ -23,6 +23,8 @@ #endif #include +#include +#include #ifdef _WIN32 # define WIN32_LEAN_AND_MEAN