[gjs/master.windows: 1/9] win32/NMake: Require Visual Studio 2017 15.6 or later
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs/master.windows: 1/9] win32/NMake: Require Visual Studio 2017 15.6 or later
- Date: Tue, 26 Feb 2019 09:23:46 +0000 (UTC)
commit f6f015cf0ae9570f2d3c3e4b4cd8ee0034fb457f
Author: Chun-wei Fan <fanchunwei src gnome org>
Date: Fri Feb 22 13:30:42 2019 +0800
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.
Also link to mozglue.lib, as APIs from that library is now required,
too.
win32/Makefile.vc | 6 +++---
win32/README.txt | 12 ++++++------
win32/config-msvc.mak | 6 ++++--
win32/detectenv-msvc.mak | 6 +++++-
4 files changed, 18 insertions(+), 12 deletions(-)
---
diff --git a/win32/Makefile.vc b/win32/Makefile.vc
index 6cbed90a..f56d83f0 100644
--- a/win32/Makefile.vc
+++ b/win32/Makefile.vc
@@ -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"
diff --git a/win32/README.txt b/win32/README.txt
index 021aaa1a..450f3db6 100644
--- a/win32/README.txt
+++ b/win32/README.txt
@@ -1,14 +1,15 @@
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:
------------------------------------------
diff --git a/win32/config-msvc.mak b/win32/config-msvc.mak
index 95e9117b..79580b21 100644
--- a/win32/config-msvc.mak
+++ b/win32/config-msvc.mak
@@ -25,7 +25,8 @@ LIBGJS_BASE_DEP_LIBS = \
$(GJS_BASE_LIBS) \
ffi.lib \
intl.lib \
- mozjs-$(MOZJS_VERSION).lib
+ mozjs-$(MOZJS_VERSION).lib \
+ mozglue.lib
# For Cairo support
CAIRO_LIBS = cairo-gobject.lib cairo.lib
@@ -59,7 +60,8 @@ GJS_BASE_CFLAGS = \
/wd4530 \
/wd4099 \
/wd4251 \
- /wd4800
+ /wd4800 \
+ /Zc:externConstexpr
LIBGJS_DEP_INCLUDES = $(BASE_INCLUDES)
LIBGJS_DEP_LIBS = $(LIBGJS_BASE_DEP_LIBS)
diff --git a/win32/detectenv-msvc.mak b/win32/detectenv-msvc.mak
index 24d19609..7b64576f 100644
--- a/win32/detectenv-msvc.mak
+++ b/win32/detectenv-msvc.mak
@@ -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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]