[glib/glib-2-50] Visual Studio builds: Add support for Visual Studio 2017
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/glib-2-50] Visual Studio builds: Add support for Visual Studio 2017
- Date: Wed, 15 Feb 2017 04:49:17 +0000 (UTC)
commit 01e7fa1a7eee76fb4a7dc9ff4b1354bb9d6bf34b
Author: Chun-wei Fan <fanchunwei src gnome org>
Date: Wed Feb 15 12:48:39 2017 +0800
Visual Studio builds: Add support for Visual Studio 2017
This adds support for Visual Studio 2017 by updating the autotools files for
copying and updating the Visual Studio 2010 project files.
Since the toolset version of Visual Studio 2017 is no longer in the form
of $(MSVC_VER_SHORT)0, we need to specify the full number, but this is a
rather simple change we have here. Note that Visual Studio 2017's CRT
aims to be compatible with the 2015's CRT, so it should be possible to
use 2017-compiled code with the 2015-compiled ones.
build/Makefile-newvs.am | 18 +++++++++++----
build/win32/Makefile.am | 3 +-
build/win32/vs15/Makefile.am | 48 ++++++++++++++++++++++++++++++++++++++++++
configure.ac | 5 ++++
4 files changed, 68 insertions(+), 6 deletions(-)
---
diff --git a/build/Makefile-newvs.am b/build/Makefile-newvs.am
index b5e3216..8161177 100644
--- a/build/Makefile-newvs.am
+++ b/build/Makefile-newvs.am
@@ -9,9 +9,17 @@
# Author: Fan, Chun-wei
# November 05, 2012
-# MSVC_VER_LONG: Long Version of Visual Studio (2012, 2013, 14 and so on)
-# MSVC_VER: Short Version of Visual Studio (11 for 2012, 12 for 2013, 14 for 2015 and so on)
-# MSVC_FORMAT_VER: Use 12 for MSVC 2012 through 2015
+# MSVC_VER_LONG: Long Version of target Visual Studio (2012, 2013, 14 and so on)
+# MSVC_VER: Short Version of target Visual Studio (110 for 2012, 120 for 2013, 140 for 2015, 141 for 2017)
+# MSVC_TOOLSET: Use if target MSVC toolsett is not in the form v $(MSVC_VER)0, meaning v$(MSVC_TOOLSET)
+
+if MSVC_BASE_NO_TOOLSET_SET
+MSVC_BASE_TOOLSET = $(MSVC_BASE_VER)0
+endif
+
+if MSVC_NO_TOOLSET_SET
+MSVC_TOOLSET = $(MSVC_VER)0
+endif
%.sln:
sed 's/11\.00/$(MSVC_FORMAT_VER)\.00/g' < $(top_srcdir)/build/win32/vs10/$@ >
$(top_builddir)/build/win32/vs$(MSVC_VER)/$@.tmp
@@ -25,9 +33,9 @@
%.vcxproj:
if test -e $(top_srcdir)/build/win32/vs10/$@; then \
- sed 's/v100/v$(MSVC_VER)0/g' < $(top_srcdir)/build/win32/vs10/$@ >
$(top_builddir)/build/win32/vs$(MSVC_VER)/$@; \
+ sed 's/v100/v$(MSVC_TOOLSET)/g' < $(top_srcdir)/build/win32/vs10/$@ >
$(top_builddir)/build/win32/vs$(MSVC_VER)/$@; \
else \
- sed 's/v100/v$(MSVC_VER)0/g' < $(top_builddir)/build/win32/vs10/$@ >
$(top_builddir)/build/win32/vs$(MSVC_VER)/$@; \
+ sed 's/v100/v$(MSVC_TOOLSET)/g' < $(top_builddir)/build/win32/vs10/$@ >
$(top_builddir)/build/win32/vs$(MSVC_VER)/$@; \
fi
%.props: $(top_builddir)/build/win32/vs10/Makefile
diff --git a/build/win32/Makefile.am b/build/win32/Makefile.am
index 5c2dac8..0f93ac2 100644
--- a/build/win32/Makefile.am
+++ b/build/win32/Makefile.am
@@ -4,7 +4,8 @@ SUBDIRS = \
vs10 \
vs11 \
vs12 \
- vs14
+ vs14 \
+ vs15
EXTRA_DIST = \
glibpc.py \
diff --git a/build/win32/vs15/Makefile.am b/build/win32/vs15/Makefile.am
new file mode 100644
index 0000000..7b2d28c
--- /dev/null
+++ b/build/win32/vs15/Makefile.am
@@ -0,0 +1,48 @@
+EXTRA_DIST = \
+ README.txt \
+ glib.sln \
+ glib.vcxproj \
+ glib.vcxproj.filters \
+ glib-genmarshal.vcxproj \
+ glib-genmarshal.vcxproj.filters \
+ gspawn-win32-helper-console.vcxproj \
+ gspawn-win32-helper-console.vcxproj.filters \
+ gspawn-win32-helper.vcxproj \
+ gspawn-win32-helper.vcxproj.filters \
+ gmodule.vcxproj \
+ gmodule.vcxproj.filters \
+ gobject.vcxproj \
+ gobject.vcxproj.filters \
+ gthread.vcxproj \
+ gthread.vcxproj.filters \
+ gio.vcxproj \
+ gio.vcxproj.filters \
+ glib-compile-schemas.vcxproj \
+ glib-compile-schemas.vcxproj.filters \
+ gsettings.vcxproj \
+ gsettings.vcxproj.filters \
+ glib-compile-resources.vcxproj \
+ glib-compile-resources.vcxproj.filters \
+ gio-tool.vcxproj \
+ gio-tool.vcxproj.filters \
+ gresource.vcxproj \
+ gresource.vcxproj.filters \
+ gio-querymodules.vcxproj \
+ gio-querymodules.vcxproj.filters \
+ gdbus.vcxproj \
+ gdbus.vcxproj.filters \
+ glib-install.vcxproj \
+ glib-install.vcxproj.filters \
+ glib-build-defines.props \
+ glib-install.props \
+ glib-version-paths.props \
+ glib-gen-srcs.props
+
+DISTCLEANFILES = $(EXTRA_DIST)
+
+MSVC_VER = 15
+MSVC_FORMAT_VER = 12
+MSVC_VER_LONG = 15
+MSVC_TOOLSET = 141
+
+include $(top_srcdir)/build/Makefile-newvs.am
diff --git a/configure.ac b/configure.ac
index da2c306..97420f1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3278,6 +3278,10 @@ AM_CONDITIONAL(HAVE_DBUS1, [test "x$have_dbus1" = "xyes"])
AC_CHECK_PROGS([DBUS_DAEMON], [dbus-daemon])
AM_CONDITIONAL([HAVE_DBUS_DAEMON], [test x$DBUS_DAEMON = xdbus-daemon ])
+# Check whether MSVC toolset is explicitly set
+AM_CONDITIONAL(MSVC_BASE_NO_TOOLSET_SET, [test x$MSVC_BASE_TOOLSET = x])
+AM_CONDITIONAL(MSVC_NO_TOOLSET_SET, [test x$MSVC_TOOLSET = x])
+
dnl
dnl Check for -Bsymbolic-functions linker flag used to avoid
dnl intra-library PLT jumps, if available.
@@ -3441,6 +3445,7 @@ build/win32/vs10/glib-version-paths.props
build/win32/vs11/Makefile
build/win32/vs12/Makefile
build/win32/vs14/Makefile
+build/win32/vs15/Makefile
glib/Makefile
glib/libcharset/Makefile
glib/gnulib/Makefile
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]