aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Holme <steve_holme@hotmail.com>2014-11-16 17:18:19 +0000
committerSteve Holme <steve_holme@hotmail.com>2014-11-16 17:24:48 +0000
commit23e70e1cc65bf7491e78ab13331a141236b64775 (patch)
treefb16e63354589f028e57e01415e5f2ab14684c52
parent800094802e29935e2785fb9d33c3b3a6af0ad818 (diff)
config-win32: Introduce build targets for VS2012+
Visual Studio 2012 introduced support for Windows Store apps as well as supporting Windows Phone 8. Introduced build targets that allow more modern APIs to be used as certain legacy ones are not available on these new platforms.
-rw-r--r--lib/config-win32.h45
1 files changed, 31 insertions, 14 deletions
diff --git a/lib/config-win32.h b/lib/config-win32.h
index 62bbedcaa..ef6020ab5 100644
--- a/lib/config-win32.h
+++ b/lib/config-win32.h
@@ -502,26 +502,30 @@
# endif
#endif
-/* Officially, Microsoft's Windows SDK versions 6.X do not support Windows
- 2000 as a supported build target. VS2008 default installations provide
- an embedded Windows SDK v6.0A along with the claim that Windows 2000 is
- a valid build target for VS2008. Popular belief is that binaries built
- with VS2008 using Windows SDK versions 6.X and Windows 2000 as a build
- target are functional. */
-#if defined(_MSC_VER) && (_MSC_VER >= 1500)
+/* Define some minimum and default build targets for Visual Studio */
+#if defined(_MSC_VER)
+ /* Officially, Microsoft's Windows SDK versions 6.X does not support Windows
+ 2000 as a supported build target. VS2008 default installations provides
+ an embedded Windows SDK v6.0A along with the claim that Windows 2000 is a
+ valid build target for VS2008. Popular belief is that binaries built with
+ VS2008 using Windows SDK versions v6.X and Windows 2000 as a build target
+ are functional. */
# define VS2008_MIN_TARGET 0x0500
-#endif
-/* When no build target is specified VS2008 default build target is Windows
- Vista, which leaves out even Winsows XP. If no build target has been given
- for VS2008 we will target the minimum Officially supported build target,
- which happens to be Windows XP. */
-#if defined(_MSC_VER) && (_MSC_VER >= 1500)
+ /* The minimum build target for VS2012 is Vista unless Update 1 is installed
+ and the v110_xp toolset is choosen. */
+# define VS2012_MIN_TARGET 0x0600
+
+ /* VS2008 default build target is Windows Vista. We override default target
+ to be Windows XP. */
# define VS2008_DEF_TARGET 0x0501
+
+ /* VS2012 default build target is Windows Vista. */
+# define VS2012_DEF_TARGET 0x0600
#endif
/* VS2008 default target settings and minimum build target check. */
-#if defined(_MSC_VER) && (_MSC_VER >= 1500)
+#if defined(_MSC_VER) && (_MSC_VER >= 1500) && (_MSC_VER <= 1600)
# ifndef _WIN32_WINNT
# define _WIN32_WINNT VS2008_DEF_TARGET
# endif
@@ -533,6 +537,19 @@
# endif
#endif
+/* VS2012 default target settings and minimum build target check. */
+#if defined(_MSC_VER) && (_MSC_VER >= 1700)
+# ifndef _WIN32_WINNT
+# define _WIN32_WINNT VS2012_DEF_TARGET
+# endif
+# ifndef WINVER
+# define WINVER VS2012_DEF_TARGET
+# endif
+# if (_WIN32_WINNT < VS2012_MIN_TARGET) || (WINVER < VS2012_MIN_TARGET)
+# error VS2012 does not support Windows build targets prior to Windows Vista
+# endif
+#endif
+
/* When no build target is specified Pelles C 5.00 and later default build
target is Windows Vista. We override default target to be Windows 2000. */
#if defined(__POCC__) && (__POCC__ >= 500)