Commit bb4c37bf authored by Chun-wei Fan's avatar Chun-wei Fan

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.
parent b591609e
......@@ -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
......
SUBDIRS = vs12 vs14
SUBDIRS = vs12 vs14 vs15
if HAVE_INTROSPECTION
GENERATED_ITEMS = \
......
......@@ -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
......
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
......@@ -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])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment