From 08e1a06fcdac2e625a6736c605e39f39d36952a4 Mon Sep 17 00:00:00 2001 From: Alberto Luaces Date: Tue, 26 Dec 2017 15:35:42 +0100 Subject: [PATCH 1/2] Detecting the windows version at build time breaks cross-compilation. I have made this auto-detection optional (default ON). --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2bb3196b7..941f32f37 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -344,10 +344,14 @@ ENDIF() 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 INCLUDE (OsgDetermineWinVersion) get_WIN32_WINNT(WIN_VERSION) ADD_DEFINITIONS(-D_WIN32_WINNT=${WIN_VERSION}) + ENDIF(OSG_DETERMINE_WIN_VERSION) IF(MSVC) # This option is to enable the /MP switch for Visual Studio 2005 and above compilers From 91aec8107aa36c0aa3532b1d4f2c0bcd840bf0de Mon Sep 17 00:00:00 2001 From: OpenSceneGraph git repository Date: Sun, 31 Dec 2017 13:32:44 +0000 Subject: [PATCH 2/2] Improved indentation --- CMakeLists.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 941f32f37..d8c8e755b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -346,11 +346,11 @@ ENDIF() 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 - INCLUDE (OsgDetermineWinVersion) - get_WIN32_WINNT(WIN_VERSION) - ADD_DEFINITIONS(-D_WIN32_WINNT=${WIN_VERSION}) + IF(OSG_DETERMINE_WIN_VERSION) + # Check window version + INCLUDE (OsgDetermineWinVersion) + get_WIN32_WINNT(WIN_VERSION) + ADD_DEFINITIONS(-D_WIN32_WINNT=${WIN_VERSION}) ENDIF(OSG_DETERMINE_WIN_VERSION) IF(MSVC)