Support static linking against FreeType
Static linking against FreeType is possible, and FreeType supplies a static form, libfreetype.a. It should be possible to link against this instead of the dynamic library.
+1
Are there any other -sys libraries that supports both static and dynamical linking which we could use for reference?
openssl-sys uses static or dynamic linking depending on the target, but it could be done based on other configuration info instead:
https://github.com/sfackler/rust-openssl/blob/7b8aa9b9153ba4da4069bafbc3d0d4b476f25f9c/openssl-sys/build.rs#L18-L22
I imagine we'd default to static, and switch dynamic if that wasn't available or if prefer-dynamic was passed.
Statically linking by default is fine for me.
This is still relevant?
I believe so.
Static linking should just work fine already on Windows if you have a static version of freetype and specify that as the library name instead of the dynamic version.