Added script to identify Windows version

Added script to identify the Windows version used to compile the source.
Currently the windows version for Windows NT is hard coded into the
source. By running this CMake script the _WIN32_WINNT preprocessor
variable gets set to the corresponding windows version.
This commit is contained in:
Björn Blissing
2017-11-30 12:53:24 +01:00
parent e8f7eeb5dc
commit 09eefd7973
3 changed files with 36 additions and 1 deletions

View File

@@ -16,8 +16,17 @@
#include <osgViewer/Export>
// Fallback if not correctly detected in CMake macro
#ifndef _WIN32_WINNT
#define _WIN32_WINNT 0x0500
//#define _WIN32_WINNT 0x0A00 // Windows 10
//#define _WIN32_WINNT 0x0603 // Windows 8.1
//#define _WIN32_WINNT 0x0602 // Windows 8
//#define _WIN32_WINNT 0x0601 // Windows 7
//#define _WIN32_WINNT 0x0600 // Windows Server 2008
//#define _WIN32_WINNT 0x0600 // Windows Vista
//#define _WIN32_WINNT 0x0502 // Windows Server 2003 with SP1, Windows XP with SP2
//#define _WIN32_WINNT 0x0501 // Windows Server 2003, Windows XP
#define _WIN32_WINNT 0x0500 // Windows NT
#endif
#include <windows.h>