Hash :
d7b6636e
Author :
Date :
2015-11-03T19:00:42
build: Support Visual Studio builds using NMake This adds a set of NMake Makefiles that can be used to build HarfBuzz, from the standard basic build building the minimal HarfBuzz DLL (consisting of OpenType, fallback and Uniscribe support only), to a full fledged build consisting of GLib and FreeType support, as well as building the utilities, the test programs in src/ and test/api, and HarfBuzz-ICU and HarfBuzz-GObject, and up to building the introspection files. This means a flexible build mechanism is supported here, so anything that is supported for a Windows build (code-wise), should all be supported by this build system. As in an earlier commit, the source listings are shared with the autotools builds with the various Makefile.sources in src/, src/hb-ucdn and util/, and this set of NMake Makefiles will transform these lists into the form they want. In the current form, all the test programs in test/api pass, and this has been checked successfully with 'make -j8 distcheck'.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
!if "$(BUILD_INTROSPECTION)" == "TRUE"
# Create the file list for introspection (to avoid the dreaded command-line-too-long problem on Windows)
$(CFG)\$(PLAT)\hb_list: $(HB_ACTUAL_HEADERS) $(HB_ACTUAL_SOURCES) $(HB_GOBJECT_ENUM_GENERATED_SOURCES) $(HB_GOBJECT_ACTUAL_SOURCES)
@for %f in ($(HB_ACTUAL_HEADERS) $(HB_ACTUAL_SOURCES) $(HB_GOBJECT_ENUM_GENERATED_SOURCES) $(HB_GOBJECT_ACTUAL_SOURCES)) do @echo %f >> $@
$(CFG)\$(PLAT)\HarfBuzz-0.0.gir: $(CFG)\$(PLAT)\harfbuzz-gobject.lib $(CFG)\$(PLAT)\hb_list
@set LIB=$(CFG)\$(PLAT);$(PREFIX)\lib;$(LIB)
@set PATH=$(CFG)\$(PLAT);$(PREFIX)\bin;$(PATH)
@-echo Generating $@...
$(PYTHON) $(G_IR_SCANNER) \
--verbose -no-libtool \
-I..\src -n hb --identifier-prefix=hb_ --warn-all \
--namespace=HarfBuzz \
--nsversion=0.0 \
--include=GObject-2.0 \
--library=harfbuzz-gobject \
--library=harfbuzz \
--add-include-path=$(G_IR_INCLUDEDIR) \
--pkg-export=harfbuzz \
--cflags-begin \
$(CFLAGS) $(HB_DEFINES) $(HB_CFLAGS) \
-DHB_H \
-DHB_H_IN \
-DHB_OT_H \
-DHB_OT_H_IN \
-DHB_GOBJECT_H \
-DHB_GOBJECT_H_IN \
--cflags-end \
--filelist=$(CFG)\$(PLAT)\hb_list \
-o $@
$(CFG)\$(PLAT)\HarfBuzz-0.0.typelib: $(CFG)\$(PLAT)\HarfBuzz-0.0.gir
@copy $*.gir $(@B).gir
$(PREFIX)\bin\g-ir-compiler \
--includedir=$(CFG)\$(PLAT) --debug --verbose \
$(@B).gir \
-o $@
@del $(@B).gir
!else
!error $(ERROR_MSG)
!endif