From bc1244e2395f844b2b41315cb1eef29570e46b29 Mon Sep 17 00:00:00 2001 From: Chun-wei Fan Date: Thu, 6 Apr 2017 18:44:28 +0800 Subject: [PATCH] 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). --- win32/config-msvc.mak | 22 ++++++++++++---------- win32/detectenv-msvc.mak | 4 +++- win32/info-msvc.mak | 12 ++++++++---- 3 files changed, 23 insertions(+), 15 deletions(-) diff --git a/win32/config-msvc.mak b/win32/config-msvc.mak index d66bb2c0f..6865bed67 100644 --- a/win32/config-msvc.mak +++ b/win32/config-msvc.mak @@ -42,6 +42,7 @@ HB_SOURCES = \ $(HB_OT_sources) \ $(HB_OT_RAGEL_GENERATED_sources) + HB_HEADERS = \ $(HB_BASE_headers) \ $(HB_NODIST_headers) \ @@ -177,6 +178,17 @@ HB_TESTS = \ $(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_HEADERS = $(HB_HEADERS) $(HB_ICU_headers) 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 ca09793cb..d10805253 100644 --- a/win32/detectenv-msvc.mak +++ b/win32/detectenv-msvc.mak @@ -87,8 +87,10 @@ 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) < 2000 +VSVER = 15 !else VSVER = 0 !endif diff --git a/win32/info-msvc.mak b/win32/info-msvc.mak index 9b92e0311..70daf7625 100644 --- a/win32/info-msvc.mak +++ b/win32/info-msvc.mak @@ -6,17 +6,21 @@ BUILT_LIBRARIES = HarfBuzz !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"