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

win32/NMake: Require Visual Studio 2017 15.6 or later

The code, in addition to SpiderMonkey 60, requires C++-14 features that
are supported in Visual Studio 2017 or later, plus we need to use the
/Zc:externConstexpr compiler flag, which is provided in Visual Studio 2017
15.6.x or later, so update the NMake Makefiles to check for that.
parent b1b9f3b9
......@@ -18,8 +18,8 @@
!if "$(VALID_CFGSET)" == "TRUE"
# We need Visual Studio 2013 or later
!if $(VSVER) < 12
# We need Visual Studio 2017 15.6 or later
!if $(VCVERSION) < 1913
VALID_MSC = FALSE
!else
VALID_MSC = TRUE
......@@ -53,7 +53,7 @@ tests: all
!else # "$(VALID_MSC)" == "TRUE"
all:
@echo You need Visual Studio 2013 or later.
@echo You need Visual Studio 2017 15.6 or later.
!endif # "$(VALID_MSC)" == "TRUE"
......
Instructions for building GJS on Visual Studio
==============================================
Building the GJS on Windows is now supported using Visual Studio
versions 2013 or later in both 32-bit and 64-bit (x64) flavors,
via NMake Makefiles. Due to C++-11 usage, Visual Studio 2012 or
earlier is not supported.
versions 2017 15.6.x or later in both 32-bit and 64-bit (x64) flavors,
via NMake Makefiles. Due to C++-14 usage, Visual Studio 2015 or
earlier is not supported, nor is Visual Studio 2017 15.5.x or earlier,
as the compiler flag /Zc:externConstexpr is needed.
You will need the following items to build GJS using Visual Studio:
-SpiderMonkey 60 (mozjs-60)
-GObject-Introspection (G-I) 1.41.4 or later
-GLib 2.50.x or later, (which includes GIO, GObject, and the associated tools)
-GLib 2.54.x or later, (which includes GIO, GObject, and the associated tools)
-Cairo including Cairo-GObject support, unless NO_CAIRO=1 is specified.
-GTK+-3.20.x or later, unless NO_GTK=1 is specified.
-and anything that the above items depends on.
......@@ -49,8 +50,7 @@ PREFIX: Optional. Base directory of where the third-party headers, libraries
specified, $(PREFIX) is set as $(srcroot)\..\vs$(X)\$(platform), where
$(platform) is win32 for 32-bit builds or x64 for 64-bit builds, and
$(X) is the short version of the Visual Studio used, as follows:
2013: 12
2015: 14
2017: 15
Explanation of options, set by <option>=1:
------------------------------------------
......
......@@ -59,7 +59,8 @@ GJS_BASE_CFLAGS = \
/wd4530 \
/wd4099 \
/wd4251 \
/wd4800
/wd4800 \
/Zc:externConstexpr
LIBGJS_DEP_INCLUDES = $(BASE_INCLUDES)
LIBGJS_DEP_LIBS = $(LIBGJS_BASE_DEP_LIBS)
......
......@@ -87,8 +87,12 @@ VSVER = 10
VSVER = 11
!elseif $(VCVERSION) > 1799 && $(VCVERSION) < 1900
VSVER = 12
!elseif $(VCVERSION) > 1899 && $(VCVERSION) < 2000
!elseif $(VCVERSION) > 1899 && $(VCVERSION) < 1910
VSVER = 14
!elseif $(VCVERSION) > 1909 && $(VCVERSION) < 1920
VSVER = 15
!elseif $(VCVERSION) > 1919 && $(VCVERSION) < 2000
VSVER = 16
!else
VSVER = 0
!endif
......
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