[gjs/master.windows: 5/9] win32/NMake: Require Visual Studio 2017 15.6 or later



commit d61ccad2161754e972ef24596b208ab020422dbb
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/config-msvc.mak    | 6 ++++--
 win32/detectenv-msvc.mak | 6 +++++-
 3 files changed, 12 insertions(+), 6 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/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]