From 0be6766d9be08bce4901ab3b5d80657070e65ee1 Mon Sep 17 00:00:00 2001 From: Chun-wei Fan Date: Mon, 7 Sep 2015 14:46:10 +0800 Subject: [PATCH] MSVC Builds: Prepare For Visual Studio 2015 Update the autotools module so that we can use it to upgrade the Visual Studio 2010 projects to become Visual Studio 2015-compatible. Note that this will make the MSVC 2015 builds use the the the latest VC140 CRT. --- build/Makefile-newvs.am | 18 +++++++++++------- build/win32/vs11/Makefile.am | 4 +--- build/win32/vs12/Makefile.am | 4 +--- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/build/Makefile-newvs.am b/build/Makefile-newvs.am index e3acd9197..33ee29f1e 100644 --- a/build/Makefile-newvs.am +++ b/build/Makefile-newvs.am @@ -5,15 +5,19 @@ # Author: Fan, Chun-wei # November 05, 2012 -# MSVC_SLN: name of root project +# MSVC_VER_LONG: Long Version of Visual Studio (2012, 2013, 2015 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_FORMAT_VER=$(shell echo $$(expr $(MSVC_VER) + 1)) +%.sln: + sed 's/11\.00/$(MSVC_FORMAT_VER)\.00/g' < $(top_srcdir)/build/win32/vs10/$@ > $(top_builddir)/build/win32/vs$(MSVC_VER)/$@.tmp + sed 's/2010/$(MSVC_VER_LONG)/g' < $(top_builddir)/build/win32/vs$(MSVC_VER)/$@.tmp > $(top_builddir)/build/win32/vs$(MSVC_VER)/$@ + rm $(top_builddir)/build/win32/vs$(MSVC_VER)/$@.tmp -$(MSVC_SLN).sln: $(top_srcdir)/build/win32/vs10/$(MSVC_SLN).sln - cat $< | sed 's/11\.00/$(MSVC_FORMAT_VER)\.00/g' | sed 's/2010/$(MSVC_VER_LONG)/g' > $(top_builddir)/build/win32/vs$(MSVC_VER)/$@ - -README.txt: $(top_srcdir)/build/win32/vs10/README.txt - cat $< | sed 's/vs10/vs$(MSVC_VER)/g' | sed 's/VS10/VS$(MSVC_VER)/g' > $(top_builddir)/build/win32/vs$(MSVC_VER)/$@ +%.txt: + sed 's/vs10/vs$(MSVC_VER)/g' < $(top_srcdir)/build/win32/vs10/$@ > $(top_builddir)/build/win32/vs$(MSVC_VER)/$@.tmp + sed 's/VS10/VS$(MSVC_VER)/g' < $(top_builddir)/build/win32/vs$(MSVC_VER)/$@.tmp > $(top_builddir)/build/win32/vs$(MSVC_VER)/$@ + rm $(top_builddir)/build/win32/vs$(MSVC_VER)/$@.tmp %.vcxproj: if test -e $(top_srcdir)/build/win32/vs10/$@; then \ diff --git a/build/win32/vs11/Makefile.am b/build/win32/vs11/Makefile.am index 0f4090eff..f449c68a5 100644 --- a/build/win32/vs11/Makefile.am +++ b/build/win32/vs11/Makefile.am @@ -37,10 +37,8 @@ EXTRA_DIST = \ DISTCLEANFILES = $(EXTRA_DIST) -MSVC_SLN = glib - MSVC_VER = 11 - +MSVC_FORMAT_VER = 12 MSVC_VER_LONG = 2012 include $(top_srcdir)/build/Makefile-newvs.am diff --git a/build/win32/vs12/Makefile.am b/build/win32/vs12/Makefile.am index 020a26cf8..666caf799 100644 --- a/build/win32/vs12/Makefile.am +++ b/build/win32/vs12/Makefile.am @@ -37,10 +37,8 @@ EXTRA_DIST = \ DISTCLEANFILES = $(EXTRA_DIST) -MSVC_SLN = glib - MSVC_VER = 12 - +MSVC_FORMAT_VER = 12 MSVC_VER_LONG = 2013 include $(top_srcdir)/build/Makefile-newvs.am