Detecting the windows version at build time breaks cross-compilation.

I have made this auto-detection optional (default ON).
This commit is contained in:
Alberto Luaces 2017-12-26 15:35:42 +01:00
parent 5afd32b2d9
commit 08e1a06fcd

View File

@ -344,10 +344,14 @@ ENDIF()
IF(WIN32 AND NOT ANDROID) IF(WIN32 AND NOT ANDROID)
OPTION(OSG_DETERMINE_WIN_VERSION "Wheter to automatically determine current Windows version" ON)
IF(OSG_DETERMINE_WIN_VERSION)
# Check window version # Check window version
INCLUDE (OsgDetermineWinVersion) INCLUDE (OsgDetermineWinVersion)
get_WIN32_WINNT(WIN_VERSION) get_WIN32_WINNT(WIN_VERSION)
ADD_DEFINITIONS(-D_WIN32_WINNT=${WIN_VERSION}) ADD_DEFINITIONS(-D_WIN32_WINNT=${WIN_VERSION})
ENDIF(OSG_DETERMINE_WIN_VERSION)
IF(MSVC) IF(MSVC)
# This option is to enable the /MP switch for Visual Studio 2005 and above compilers # This option is to enable the /MP switch for Visual Studio 2005 and above compilers