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).
This commit is contained in:
Chun-wei Fan 2017-04-06 18:44:28 +08:00 committed by Khaled Hosny
parent a4471d0c2c
commit bc1244e239
3 changed files with 23 additions and 15 deletions

View File

@ -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)

View File

@ -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

View File

@ -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"