NMake Makefiles: Fix ICU builds
Fix the check conditions in config-msvc.mak and info-msvc.mak so that
the ICU items does indeed get built into the HarfBuzz main DLL, and that
the correct configuration info is displayed.
Also update the checks in detectenv-msvc.mak so that we can detect that
we are using Visual Studio 2017 (although the 2015-built binaries use
the same CRT DLL as the 2017 ones).
diff --git a/win32/config-msvc.mak b/win32/config-msvc.mak
index d66bb2c..6865bed 100644
--- a/win32/config-msvc.mak
+++ b/win32/config-msvc.mak
@@ -42,6 +42,7 @@
$(HB_OT_sources) \
$(HB_OT_RAGEL_GENERATED_sources)
+
HB_HEADERS = \
$(HB_BASE_headers) \
$(HB_NODIST_headers) \
@@ -177,6 +178,17 @@
$(CFG)\$(PLAT)\test-version.exe
!else
+
+# Define some of the macros in GLib's msvc_recommended_pragmas.h
+# to reduce some unneeded build-time warnings
+HB_CFLAGS = \
+ $(HB_CFLAGS) \
+ /wd4244 \
+ /D_CRT_SECURE_NO_WARNINGS \
+ /D_CRT_NONSTDC_NO_WARNINGS
+
+!endif
+
!if "$(ICU)" == "1"
# use ICU for Unicode functions
# and define some of the macros in GLib's msvc_recommended_pragmas.h
@@ -194,16 +206,6 @@
HB_DEP_LIBS = $(HB_DEP_LIBS) $(HB_ICU_DEP_LIBS)
!endif
-# Define some of the macros in GLib's msvc_recommended_pragmas.h
-# to reduce some unneeded build-time warnings
-HB_CFLAGS = \
- $(HB_CFLAGS) \
- /wd4244 \
- /D_CRT_SECURE_NO_WARNINGS \
- /D_CRT_NONSTDC_NO_WARNINGS
-
-!endif
-
!if "$(UNISCRIBE)" == "1"
HB_CFLAGS = $(HB_CFLAGS) /DHAVE_UNISCRIBE
HB_SOURCES = $(HB_SOURCES) $(HB_UNISCRIBE_sources)
diff --git a/win32/detectenv-msvc.mak b/win32/detectenv-msvc.mak
index ca09793..d108052 100644
--- a/win32/detectenv-msvc.mak
+++ b/win32/detectenv-msvc.mak
@@ -87,8 +87,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) < 2000
+VSVER = 15
!else
VSVER = 0
!endif
diff --git a/win32/info-msvc.mak b/win32/info-msvc.mak
index 9b92e03..70daf76 100644
--- a/win32/info-msvc.mak
+++ b/win32/info-msvc.mak
@@ -6,17 +6,21 @@
!if "$(NO_UCDN)" != "1"
UNICODE_IMPL = ucdn
-!else
-!if "$(GLIB)" == "1"
+!elseif "$(GLIB)" == "1"
UNICODE_IMPL = GLib
+!elseif "$(ICU)" == "1"
+UNICODE_IMPL = ICU
+!endif
+
+!if "$(GLIB)" == "1"
INC_FEATURES = $(INC_FEATURES) GLib
BUILT_TOOLS = hb-shape.exe hb-ot-shape-closure.exe
!if "$(CAIRO_FT)" == "1"
BUILT_TOOLS = hb-view.exe $(BUILT_TOOLS)
!endif
-!elseif "$(ICU)" == "1"
-UNICODE_IMPL = ICU
!endif
+!if "$(ICU)" == "1"
+INC_FEATURES = $(INC_FEATURES) ICU
!endif
!if "$(FREETYPE)" == "1"