builds: Fix and clean up MSVC DLL builds
authorChun-wei Fan <fanchunwei@src.gnome.org>
Wed, 25 Jul 2018 10:12:34 +0000 (18:12 +0800)
committerBehdad Esfahbod <behdad@behdad.org>
Tue, 9 Oct 2018 13:43:36 +0000 (09:43 -0400)
commit8e4ad1d7a0a35298ca04828ef1ef18b4c019ec03
treed4ce8194737363b431f2fb2459d035f64ed07b1b
parente640f3a6b16f41cee5f7868ec738fda01244e96a
builds: Fix and clean up MSVC DLL builds

Instead of passing a CFLAG/CXXFLAG to define HB_EXTERN, define it
directly in src/hb.hh as __declspec(dllexport) extern when we are
building HarfBuzz as DLLs on Visual Studio.  Define HB_INTERNAL
as nothing without defining HB_NO_VISIBILITY when building HarfBuzz as
DLLs to avoid linker errors on Visual Studio builds.

Also "install" harfbuzz-subset.dll into $(PREFIX)\bin as the
hb-subset utility will depend on that DLL at runtime, when HarfBuzz is
built as DLLs.  Since it consists of private APIs that are subject to
change, we do not install its headers nor .lib file.
CMakeLists.txt
src/hb.hh