summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChun-wei Fan <fanchunwei@src.gnome.org>2017-02-15 13:11:55 +0800
committerChun-wei Fan <fanchunwei@src.gnome.org>2017-02-15 13:11:55 +0800
commitf6c36b463ca29379024899211f99477344578555 (patch)
tree8d49d21cce7979a41d749554d06693832377c4ff
parentbb33b5eafa48466ed3f64817bf2d326132fc6253 (diff)
downloadatk-f6c36b463ca29379024899211f99477344578555.tar.gz
Visual Studio builds: Support Visual Studio 2017
Update the autotools scripts so that we can copy the Visual Studio 2010 project files and update them to obtain the Visual Studio 2017 projects. As the format of the toolset version is different, allow a version number string for the toolset version and use it if specified, otherwise just create the toolset version string as we did before. Note that Visual Studio 2015 and 2017 aims to be compatible in terms of CRT usage, so it should be possible to use 2015-built binaries with 2017-built binaries.
-rw-r--r--configure.ac5
-rw-r--r--win32/Makefile-newvs.am25
-rw-r--r--win32/Makefile.am3
-rw-r--r--win32/vs11/Makefile.am1
-rw-r--r--win32/vs12/Makefile.am1
-rw-r--r--win32/vs14/Makefile.am1
-rw-r--r--win32/vs15/Makefile.am23
7 files changed, 47 insertions, 12 deletions
diff --git a/configure.ac b/configure.ac
index 335790e..9b860fe 100644
--- a/configure.ac
+++ b/configure.ac
@@ -206,6 +206,10 @@ GTK_DOC_CHECK([1.13])
AC_PROG_AWK
AC_CHECK_PROGS(PERL, perl5 perl)
+# 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])
+
REBUILD=\#
if test "x$enable_rebuilds" = "xyes" && \
test -n "$PERL" && \
@@ -262,6 +266,7 @@ win32/vs10/atk-version-paths.props
win32/vs11/Makefile
win32/vs12/Makefile
win32/vs14/Makefile
+win32/vs15/Makefile
docs/Makefile
docs/version.xml
atk.spec
diff --git a/win32/Makefile-newvs.am b/win32/Makefile-newvs.am
index ecdf3b5..3a91862 100644
--- a/win32/Makefile-newvs.am
+++ b/win32/Makefile-newvs.am
@@ -8,14 +8,23 @@
# Author: Fan, Chun-wei
# November 05, 2012
-# MSVC_BASE_VER: Baseline MSVC 201x version to copy/process project files from (10 for 2010, 11 for 2012, 12 for 2013, 14 for 2015 and so on)
-# MSVC_BASE_VER_LONG: Long Version of baseline Visual Studio 201x version (2010, 2012, 2013, 14 and so on)
-# 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_BASE_VER: Baseline MSVC 201x version to copy/process project files from (100 for 2010, 120 for 2013)
+# MSVC_BASE_VER_LONG: Long Version of baseline Visual Studio 201x version (2010, 2012, 2013, 14, 15)
+# MSVC_BASE_TOOLSET: Use if baseline MSVC toolset is not in the form v$(MSVC_BASE_VER)0, meaning v$(MSVC_BASE_TOOLSET)
+# 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)/win32/vs$(MSVC_BASE_VER)/$@ > $(top_builddir)/win32/vs$(MSVC_VER)/$@.tmp
+ sed 's/11\.00/12\.00/g' < $(top_srcdir)/win32/vs$(MSVC_BASE_VER)/$@ > $(top_builddir)/win32/vs$(MSVC_VER)/$@.tmp
sed 's/$(MSVC_BASE_VER_LONG)/$(MSVC_VER_LONG)/g' < $(top_builddir)/win32/vs$(MSVC_VER)/$@.tmp > $(top_builddir)/win32/vs$(MSVC_VER)/$@
rm $(top_builddir)/win32/vs$(MSVC_VER)/$@.tmp
@@ -26,9 +35,9 @@
%.vcxproj:
if test -e $(top_srcdir)/win32/vs$(MSVC_BASE_VER)/$@; then \
- sed 's/v$(MSVC_BASE_VER)0/v$(MSVC_VER)0/g' < $(top_srcdir)/win32/vs$(MSVC_BASE_VER)/$@ > $(top_builddir)/win32/vs$(MSVC_VER)/$@; \
+ sed 's/v$(MSVC_BASE_TOOLSET)/v$(MSVC_TOOLSET)/g' < $(top_srcdir)/win32/vs$(MSVC_BASE_VER)/$@ > $(top_builddir)/win32/vs$(MSVC_VER)/$@; \
else \
- sed 's/v$(MSVC_BASE_VER)0/v$(MSVC_VER)0/g' < $(top_builddir)/win32/vs$(MSVC_BASE_VER)/$@ > $(top_builddir)/win32/vs$(MSVC_VER)/$@; \
+ sed 's/v$(MSVC_BASE_TOOLSET)/v$(MSVC_TOOLSET)/g' < $(top_builddir)/win32/vs$(MSVC_BASE_VER)/$@ > $(top_builddir)/win32/vs$(MSVC_VER)/$@; \
fi
%.props: $(top_builddir)/win32/vs$(MSVC_BASE_VER)/Makefile
diff --git a/win32/Makefile.am b/win32/Makefile.am
index a04ef72..7d333d0 100644
--- a/win32/Makefile.am
+++ b/win32/Makefile.am
@@ -24,7 +24,8 @@ SUBDIRS = \
vs10 \
vs11 \
vs12 \
- vs14
+ vs14 \
+ vs15
EXTRA_DIST = \
detectenv-msvc.mak \
diff --git a/win32/vs11/Makefile.am b/win32/vs11/Makefile.am
index f359f02..741cad1 100644
--- a/win32/vs11/Makefile.am
+++ b/win32/vs11/Makefile.am
@@ -18,6 +18,5 @@ MSVC_BASE_VER = 10
MSVC_BASE_VER_LONG = 2010
MSVC_VER = 11
MSVC_VER_LONG = 2012
-MSVC_FORMAT_VER = 12
include $(top_srcdir)/win32/Makefile-newvs.am
diff --git a/win32/vs12/Makefile.am b/win32/vs12/Makefile.am
index 8649d29..2825e88 100644
--- a/win32/vs12/Makefile.am
+++ b/win32/vs12/Makefile.am
@@ -18,6 +18,5 @@ MSVC_BASE_VER = 10
MSVC_BASE_VER_LONG = 2010
MSVC_VER = 12
MSVC_VER_LONG = 2013
-MSVC_FORMAT_VER = 12
include $(top_srcdir)/win32/Makefile-newvs.am
diff --git a/win32/vs14/Makefile.am b/win32/vs14/Makefile.am
index 1a6b3d4..f0a2c99 100644
--- a/win32/vs14/Makefile.am
+++ b/win32/vs14/Makefile.am
@@ -18,6 +18,5 @@ MSVC_BASE_VER = 10
MSVC_BASE_VER_LONG = 2010
MSVC_VER = 14
MSVC_VER_LONG = 14
-MSVC_FORMAT_VER = 12
include $(top_srcdir)/win32/Makefile-newvs.am
diff --git a/win32/vs15/Makefile.am b/win32/vs15/Makefile.am
new file mode 100644
index 0000000..4f290c3
--- /dev/null
+++ b/win32/vs15/Makefile.am
@@ -0,0 +1,23 @@
+EXTRA_DIST = \
+ README.txt \
+ atk.sln \
+ atk.vcxproj \
+ atk.vcxproj.filters \
+ atk-install.vcxproj \
+ atk-install.vcxproj.filters \
+ atk-build-defines.props \
+ atk-install.props \
+ atk-version-paths.props \
+ atk-gen-src.props
+
+DISTCLEANFILES = $(EXTRA_DIST)
+
+MSVC_SLN = atk
+
+MSVC_BASE_VER = 10
+MSVC_BASE_VER_LONG = 2010
+MSVC_VER = 15
+MSVC_VER_LONG = 15
+MSVC_TOOLSET = 141
+
+include $(top_srcdir)/win32/Makefile-newvs.am