Update Visual Studio builds for UCDN usage
We now use UCDN by default, so make it so in the build files; however don't hardcode HAVE_UCDN as one may still opt not to use it (but pass it in as a CFLAG unless one explicitly disables UCDN by using NO_UCDN=1 on the NMake command line). Note that we are not blocking builds where UCDN is disabled along with GLib and ICU, as that will trigger a build error anyways which will tell the user what needs to be done to remedy this.
This commit is contained in:
parent
60e2586f76
commit
f0aa167e44
|
@ -36,7 +36,7 @@ PREFIX: Optional. Base directory of where the third-party headers, libraries
|
||||||
Explanation of options, set by <option>=1:
|
Explanation of options, set by <option>=1:
|
||||||
------------------------------------------
|
------------------------------------------
|
||||||
GLIB: Enable GLib support in HarfBuzz, which also uses the GLib unicode
|
GLIB: Enable GLib support in HarfBuzz, which also uses the GLib unicode
|
||||||
callback instead of the bundled UCDN unicode callback. This requires the
|
callback if the bundled UCDN unicode callback is disabled. This requires the
|
||||||
GLib libraries, and is required for building all tool and test programs.
|
GLib libraries, and is required for building all tool and test programs.
|
||||||
|
|
||||||
GOBJECT: Enable building the HarfBuzz-GObject DLL, and thus implies GLib
|
GOBJECT: Enable building the HarfBuzz-GObject DLL, and thus implies GLib
|
||||||
|
|
|
@ -129,6 +129,16 @@ HB_HEADERS = $(HB_HEADERS) $(HB_GRAPHITE2_headers)
|
||||||
HB_DEP_LIBS = $(HB_DEP_LIBS) $(GRAPHITE2_LIB)
|
HB_DEP_LIBS = $(HB_DEP_LIBS) $(GRAPHITE2_LIB)
|
||||||
!endif
|
!endif
|
||||||
|
|
||||||
|
# Always enable UCDN unless explicitly disabled
|
||||||
|
!if "$(NO_UCDN)" != "1"
|
||||||
|
HB_DEFINES = $(HB_DEFINES) /DHAVE_UCDN=1
|
||||||
|
HB_CFLAGS = \
|
||||||
|
$(HB_CFLAGS) \
|
||||||
|
$(HB_UCDN_CFLAGS)
|
||||||
|
|
||||||
|
HB_SOURCES = $(HB_SOURCES) $(LIBHB_UCDN_sources) $(HB_UCDN_sources)
|
||||||
|
!endif
|
||||||
|
|
||||||
# Enable GLib if desired
|
# Enable GLib if desired
|
||||||
!if "$(GLIB)" == "1"
|
!if "$(GLIB)" == "1"
|
||||||
HB_DEFINES = $(HB_DEFINES) /DHAVE_GLIB=1
|
HB_DEFINES = $(HB_DEFINES) /DHAVE_GLIB=1
|
||||||
|
@ -164,16 +174,12 @@ HB_TESTS = \
|
||||||
$(CFG)\$(PLAT)\test-unicode.exe \
|
$(CFG)\$(PLAT)\test-unicode.exe \
|
||||||
$(CFG)\$(PLAT)\test-version.exe
|
$(CFG)\$(PLAT)\test-version.exe
|
||||||
|
|
||||||
!elseif "$(ICU)" == "1"
|
!else
|
||||||
|
!if "$(ICU)" == "1"
|
||||||
# use ICU for Unicode functions
|
# use ICU for Unicode functions
|
||||||
# and define some of the macros in GLib's msvc_recommended_pragmas.h
|
# and define some of the macros in GLib's msvc_recommended_pragmas.h
|
||||||
# to reduce some unneeded build-time warnings
|
# to reduce some unneeded build-time warnings
|
||||||
HB_DEFINES = $(HB_DEFINES) /DHAVE_ICU=1 /DHAVE_ICU_BUILTIN=1
|
HB_DEFINES = $(HB_DEFINES) /DHAVE_ICU=1 /DHAVE_ICU_BUILTIN=1
|
||||||
HB_CFLAGS = \
|
|
||||||
$(HB_CFLAGS) \
|
|
||||||
/wd4244 \
|
|
||||||
/D_CRT_SECURE_NO_WARNINGS \
|
|
||||||
/D_CRT_NONSTDC_NO_WARNINGS
|
|
||||||
|
|
||||||
# We don't want ICU to re-define int8_t in VS 2008, will cause build breakage
|
# We don't want ICU to re-define int8_t in VS 2008, will cause build breakage
|
||||||
# as we define it in hb-common.h, and we ought to use the definitions there.
|
# as we define it in hb-common.h, and we ought to use the definitions there.
|
||||||
|
@ -186,18 +192,14 @@ HB_HEADERS = $(HB_HEADERS) $(HB_ICU_headers)
|
||||||
HB_DEP_LIBS = $(HB_DEP_LIBS) $(HB_ICU_DEP_LIBS)
|
HB_DEP_LIBS = $(HB_DEP_LIBS) $(HB_ICU_DEP_LIBS)
|
||||||
!endif
|
!endif
|
||||||
|
|
||||||
!if "$(UCDN)" != "0"
|
|
||||||
# Define some of the macros in GLib's msvc_recommended_pragmas.h
|
# Define some of the macros in GLib's msvc_recommended_pragmas.h
|
||||||
# to reduce some unneeded build-time warnings
|
# to reduce some unneeded build-time warnings
|
||||||
HB_DEFINES = $(HB_DEFINES) /DHAVE_UCDN=1
|
|
||||||
HB_CFLAGS = \
|
HB_CFLAGS = \
|
||||||
$(HB_CFLAGS) \
|
$(HB_CFLAGS) \
|
||||||
$(HB_UCDN_CFLAGS) \
|
/wd4244 \
|
||||||
/wd4244 \
|
/D_CRT_SECURE_NO_WARNINGS \
|
||||||
/D_CRT_SECURE_NO_WARNINGS \
|
|
||||||
/D_CRT_NONSTDC_NO_WARNINGS
|
/D_CRT_NONSTDC_NO_WARNINGS
|
||||||
|
|
||||||
HB_SOURCES = $(HB_SOURCES) $(LIBHB_UCDN_sources) $(HB_UCDN_sources)
|
|
||||||
!endif
|
!endif
|
||||||
|
|
||||||
!if "$(UNISCRIBE)" == "1"
|
!if "$(UNISCRIBE)" == "1"
|
||||||
|
|
|
@ -112,7 +112,7 @@
|
||||||
#define HAVE_SYS_TYPES_H 1
|
#define HAVE_SYS_TYPES_H 1
|
||||||
|
|
||||||
/* Have UCDN Unicode functions */
|
/* Have UCDN Unicode functions */
|
||||||
#define HAVE_UCDN 1
|
/* #undef HAVE_UCDN */
|
||||||
|
|
||||||
/* Have Uniscribe library */
|
/* Have Uniscribe library */
|
||||||
/* #undef HAVE_UNISCRIBE */
|
/* #undef HAVE_UNISCRIBE */
|
||||||
|
|
|
@ -4,6 +4,9 @@ INC_FEATURES = Fallback OT
|
||||||
BUILT_TOOLS =
|
BUILT_TOOLS =
|
||||||
BUILT_LIBRARIES = HarfBuzz
|
BUILT_LIBRARIES = HarfBuzz
|
||||||
|
|
||||||
|
!if "$(NO_UCDN)" != "1"
|
||||||
|
UNICODE_IMPL = ucdn
|
||||||
|
!else
|
||||||
!if "$(GLIB)" == "1"
|
!if "$(GLIB)" == "1"
|
||||||
UNICODE_IMPL = GLib
|
UNICODE_IMPL = GLib
|
||||||
INC_FEATURES = $(INC_FEATURES) GLib
|
INC_FEATURES = $(INC_FEATURES) GLib
|
||||||
|
@ -13,8 +16,7 @@ BUILT_TOOLS = hb-view.exe $(BUILT_TOOLS)
|
||||||
!endif
|
!endif
|
||||||
!elseif "$(ICU)" == "1"
|
!elseif "$(ICU)" == "1"
|
||||||
UNICODE_IMPL = ICU
|
UNICODE_IMPL = ICU
|
||||||
!else
|
!endif
|
||||||
UNICODE_IMPL = ucdn
|
|
||||||
!endif
|
!endif
|
||||||
|
|
||||||
!if "$(FREETYPE)" == "1"
|
!if "$(FREETYPE)" == "1"
|
||||||
|
@ -79,18 +81,18 @@ help:
|
||||||
@echo.
|
@echo.
|
||||||
@echo OPTION: Optional, may be any of the following, use OPTION=1 to enable;
|
@echo OPTION: Optional, may be any of the following, use OPTION=1 to enable;
|
||||||
@echo multiple OPTION's may be used. If no OPTION is specified, a default
|
@echo multiple OPTION's may be used. If no OPTION is specified, a default
|
||||||
@echo HarfBuzz DLL is built with OpenType and fallback support
|
@echo HarfBuzz DLL is built with OpenType and support with a bundled
|
||||||
@echo with a bundled Unicode implementation (UCDN).
|
@echo Unicode implementation (UCDN).
|
||||||
@echo ======
|
@echo ======
|
||||||
@echo UNISCRIBE:
|
@echo.
|
||||||
@echo Enable Uniscribe support.
|
@echo CAIRO_FT:
|
||||||
|
@echo Enables Cairo-Freetype support, needed for the build of the hb-view utility.
|
||||||
|
@echo Implies FreeType2 support and also requires Cairo built with FreeType2
|
||||||
|
@echo support; GLib2 support must also be enabled.
|
||||||
@echo.
|
@echo.
|
||||||
@echo DIRECTWRITE:
|
@echo DIRECTWRITE:
|
||||||
@echo Enable DirectWrite support, requires a recent enough Windows SDK.
|
@echo Enable DirectWrite support, requires a recent enough Windows SDK.
|
||||||
@echo.
|
@echo.
|
||||||
@echo GRAPHITE2:
|
|
||||||
@echo Enable graphite2 support, requires the SIL Graphite2 library
|
|
||||||
@echo.
|
|
||||||
@echo FREETYPE:
|
@echo FREETYPE:
|
||||||
@echo Enable FreeType2 support, requires the FreeType2 library
|
@echo Enable FreeType2 support, requires the FreeType2 library
|
||||||
@echo.
|
@echo.
|
||||||
|
@ -98,16 +100,19 @@ help:
|
||||||
@echo Enable GLib2 support, with GLib Unicode support, requires the GNOME GLib2
|
@echo Enable GLib2 support, with GLib Unicode support, requires the GNOME GLib2
|
||||||
@echo library. Enables the build of utility programs.
|
@echo library. Enables the build of utility programs.
|
||||||
@echo.
|
@echo.
|
||||||
@echo ICU:
|
|
||||||
@echo Enable build with ICU Unicode functions, requires the International
|
|
||||||
@echo Components for Unicode (ICU) libraries.
|
|
||||||
@echo.
|
|
||||||
@echo GOBJECT:
|
@echo GOBJECT:
|
||||||
@echo Enable the HarfBuzz-GObject library, also implies GLib2 support,
|
@echo Enable the HarfBuzz-GObject library, also implies GLib2 support,
|
||||||
@echo requires the GNOME GLib2 libraries and tools, notably the glib-mkenums
|
@echo requires the GNOME GLib2 libraries and tools, notably the glib-mkenums
|
||||||
@echo tool script, which will require a PERL interpreter (use
|
@echo tool script, which will require a PERL interpreter (use
|
||||||
@echo PERL=^$(PATH_TO_PERL_INTERPRETOR)) if it is not already in your PATH).
|
@echo PERL=^$(PATH_TO_PERL_INTERPRETOR)) if it is not already in your PATH).
|
||||||
@echo.
|
@echo.
|
||||||
|
@echo GRAPHITE2:
|
||||||
|
@echo Enable graphite2 support, requires the SIL Graphite2 library
|
||||||
|
@echo.
|
||||||
|
@echo ICU:
|
||||||
|
@echo Enable build with ICU Unicode functions, requires the International
|
||||||
|
@echo Components for Unicode (ICU) libraries.
|
||||||
|
@echo.
|
||||||
@echo INTROSPECTION:
|
@echo INTROSPECTION:
|
||||||
@echo Enable the build of introspection files, also implies GObject/GLib2 support,
|
@echo Enable the build of introspection files, also implies GObject/GLib2 support,
|
||||||
@echo requires the GNOME gobject-introspection libraries and tools. You will need
|
@echo requires the GNOME gobject-introspection libraries and tools. You will need
|
||||||
|
@ -117,15 +122,17 @@ help:
|
||||||
@echo ^$(PATH_TO_PYTHON_INTERPRETOR) respectively, if python.exe is not already
|
@echo ^$(PATH_TO_PYTHON_INTERPRETOR) respectively, if python.exe is not already
|
||||||
@echo in your PATH.
|
@echo in your PATH.
|
||||||
@echo.
|
@echo.
|
||||||
@echo CAIRO_FT:
|
|
||||||
@echo Enables Cairo-Freetype support, needed for the build of the hb-view utility.
|
|
||||||
@echo Implies FreeType2 support and also requires Cairo built with FreeType2
|
|
||||||
@echo support; GLib2 support must also be enabled.
|
|
||||||
@echo.
|
|
||||||
@echo LIBTOOL_DLL_NAME:
|
@echo LIBTOOL_DLL_NAME:
|
||||||
@echo Use a libtool-style DLL name to mimic the DLL file naming generated by
|
@echo Use a libtool-style DLL name to mimic the DLL file naming generated by
|
||||||
@echo MinGW builds.
|
@echo MinGW builds.
|
||||||
@echo.
|
@echo.
|
||||||
|
@echo NO_UCDN:
|
||||||
|
@echo Do not use the bundled Unicode callback, which is the default. GLib or
|
||||||
|
@echo ICU-based unicode callback is therefore required.
|
||||||
|
@echo
|
||||||
|
@echo UNISCRIBE:
|
||||||
|
@echo Enable Uniscribe support.
|
||||||
|
@echo.
|
||||||
@echo Note that GLib2 support is required for all utility and test programs.
|
@echo Note that GLib2 support is required for all utility and test programs.
|
||||||
@echo ======
|
@echo ======
|
||||||
@echo A 'clean' target is supported to remove all generated files, intermediate
|
@echo A 'clean' target is supported to remove all generated files, intermediate
|
||||||
|
|
Loading…
Reference in New Issue