-
Notifications
You must be signed in to change notification settings - Fork 63
cmake: make possible to build both game and engine against the engine Freetype submodule #1617
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
… Freetype submodule
Some libraries may be built statically before being linked against game dll, so -fPIC would be required, and then we better compile everything with -fPIC.
766bd9d
to
4de5657
Compare
4de5657
to
3e30d43
Compare
LGTM |
Wait, what is FREETYPE_INTERNAL_ZLIB supposed to mean? We have the submodule configured so that there is no zlib dependency at all, right? The zlib dependency only comes in now for our poorly built Windows or Mac external_deps Freetype. |
Freetype ships with an internal zlib, this is good enough for the nacl game because this is the only usage of zlib in the nacl game, so we use But then the engine may share zlib with freetype and libpng, so we don't use the internal freetype zlib to avoid having two zlib in the engine binary (they don't conflict as far as I know but it's just stupid to have zlib twice). |
Hmm, rereading the code, we may use |
We disable Brotli, bzip2, Harfbuzz, and PNG which means that we won't have a zlib dependency according to the comment on https://stackoverflow.com/a/29456684. |
Yes but the engine itself links against libpng to open PNG images, so it already links against zlib. Do you mean we completely avoid zlib when building Freetype? I'm afraid we cannot avoid that, unlike |
The
|
I added the commit to only use the Freetype internal zlib when building an NaCl game. |
I read the Freetype CMakeLists.txt and it doesn't have internal zlib. I think it only implements a subset of the options of the configure script. When using CMake, if you disable zlib, there is really no zlib at all. |
I was wrong, it does implement internal zlib. I couldn't see it being built because it works by #including many There is an |
LGTM |
Make possible to build both game and engine against the engine Freetype submodule.
Extracted from #1585:
Without the controversial change about default building.
See also: