[librsvg] Visual Studio builds: Support Visual Studio 2017
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg] Visual Studio builds: Support Visual Studio 2017
- Date: Wed, 15 Feb 2017 06:51:49 +0000 (UTC)
commit bb4c37bfb016add32e1a90091174d5ca0e7b0fbb
Author: Chun-wei Fan <fanchunwei src gnome org>
Date: Wed Feb 15 14:48:27 2017 +0800
Visual Studio builds: Support Visual Studio 2017
Update the autotools scripts so that we can support Visual Studio 2017 by
copying the 2013 projects and update items as necessary to produce the
2017 projects
Note that the toolset version string format changed for Visual Studio 2017, so allow
one to use a custom toolset version string, otherwise a default toolset version string
string will be generated as it was before.
Note also that Visual Studio 2017 aims to be compatible with Visual Studio 2015 on the
CRT level, so it should be possible to use 2017-built binaries with 2015-built binaries.
build/Makefile-newvs.am | 14 ++++++++++++--
build/win32/Makefile.am | 2 +-
build/win32/vs12/Makefile.am | 1 +
build/win32/vs15/Makefile.am | 28 ++++++++++++++++++++++++++++
configure.ac | 8 ++++++++
5 files changed, 50 insertions(+), 3 deletions(-)
---
diff --git a/build/Makefile-newvs.am b/build/Makefile-newvs.am
index 9fd89f9..81c814b 100644
--- a/build/Makefile-newvs.am
+++ b/build/Makefile-newvs.am
@@ -11,10 +11,20 @@
# 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_BASE_TOOLSET: Use if baseline MSVC toolset is not in the form $(MSVC_BASE_VER)0, meaning
v$(MSVC_BASE_TOOLSET)
# 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_TOOLSET: Use if target MSVC toolsett is not in the form v $(MSVC_VER)0, meaning v$(MSVC_TOOLSET)
# MSVC_FORMAT_VER: Use 12 for MSVC 2012 through 2015
+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/vs$(MSVC_BASE_VER)/$@ >
$(top_builddir)/build/win32/vs$(MSVC_VER)/$@.tmp
sed 's/$(MSVC_BASE_VER_LONG)/$(MSVC_VER_LONG)/g' < $(top_builddir)/build/win32/vs$(MSVC_VER)/$@.tmp >
$(top_builddir)/build/win32/vs$(MSVC_VER)/$@
@@ -27,9 +37,9 @@
%.vcxproj:
if test -e $(top_srcdir)/build/win32/vs$(MSVC_BASE_VER)/$@; then \
- sed 's/v$(MSVC_BASE_VER)0/v$(MSVC_VER)0/g' < $(top_srcdir)/build/win32/vs$(MSVC_BASE_VER)/$@
$(top_builddir)/build/win32/vs$(MSVC_VER)/$@; \
+ sed 's/v$(MSVC_BASE_TOOLSET)/v$(MSVC_TOOLSET)/g' <
$(top_srcdir)/build/win32/vs$(MSVC_BASE_VER)/$@ > $(top_builddir)/build/win32/vs$(MSVC_VER)/$@; \
else \
- sed 's/v$(MSVC_BASE_VER)0/v$(MSVC_VER)0/g' <
$(top_builddir)/build/win32/vs$(MSVC_BASE_VER)/$@ > $(top_builddir)/build/win32/vs$(MSVC_VER)/$@; \
+ sed 's/v$(MSVC_BASE_TOOLSET)/v$(MSVC_TOOLSET)/g' <
$(top_builddir)/build/win32/vs$(MSVC_BASE_VER)/$@ > $(top_builddir)/build/win32/vs$(MSVC_VER)/$@; \
fi
%.props: $(top_builddir)/build/win32/vs$(MSVC_BASE_VER)/Makefile
diff --git a/build/win32/Makefile.am b/build/win32/Makefile.am
index 63e4b84..ae2194e 100644
--- a/build/win32/Makefile.am
+++ b/build/win32/Makefile.am
@@ -1,4 +1,4 @@
-SUBDIRS = vs12 vs14
+SUBDIRS = vs12 vs14 vs15
if HAVE_INTROSPECTION
GENERATED_ITEMS = \
diff --git a/build/win32/vs12/Makefile.am b/build/win32/vs12/Makefile.am
index bddc191..b849b99 100644
--- a/build/win32/vs12/Makefile.am
+++ b/build/win32/vs12/Makefile.am
@@ -26,6 +26,7 @@ EXTRA_DIST = \
rsvg-install.props: $(top_srcdir)/build/win32/vs12/rsvg-install.propsin rsvg.vs12.headers
-$(RM) $(top_builddir)/build/win32/vs14/rsvg-install.props
+ -$(RM) $(top_builddir)/build/win32/vs15/rsvg-install.props
$(CPP) -P - <$(top_srcdir)/build/win32/vs12/rsvg-install.propsin >$@
rm rsvg.vs12.headers
diff --git a/build/win32/vs15/Makefile.am b/build/win32/vs15/Makefile.am
new file mode 100644
index 0000000..8c50708
--- /dev/null
+++ b/build/win32/vs15/Makefile.am
@@ -0,0 +1,28 @@
+EXTRA_DIST = \
+ librsvg.sln \
+ rsvg-build-defines.props \
+ rsvg-gen-srcs.props \
+ rsvg-install.props \
+ rsvg-version-paths.props \
+ libpixbufloader-svg.vcxproj \
+ libpixbufloader-svg.vcxproj.filters \
+ rsvg.vcxproj \
+ rsvg.vcxproj.filters \
+ rsvg-convert.vcxproj \
+ rsvg-convert.vcxproj.filters \
+ rsvg-rust.vcxproj \
+ rsvg-install.vcxproj \
+ rsvg-view-3.vcxproj \
+ rsvg-view-3.vcxproj.filters \
+ README.txt
+
+DISTCLEANFILES = $(EXTRA_DIST)
+
+MSVC_BASE_VER = 12
+MSVC_BASE_VER_LONG = 2013
+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 c23773e..22ef9dd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -295,6 +295,13 @@ GLIB_LC_MESSAGES
dnl ===========================================================================
+# 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 ===========================================================================
+
AC_SUBST([AM_CPPFLAGS])
AC_SUBST([AM_CFLAGS])
AC_SUBST([AM_LDFLAGS])
@@ -313,6 +320,7 @@ build/Makefile
build/win32/Makefile
build/win32/vs12/Makefile
build/win32/vs14/Makefile
+build/win32/vs15/Makefile
])
AC_CONFIG_FILES([librsvg-${RSVG_API_VERSION}.pc:librsvg.pc.in],[],[RSVG_API_VERSION=$RSVG_API_VERSION])
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]