Skip to content

Comments

Fix Freetype mess, MinGW native gamelogic build#3293

Merged
slipher merged 1 commit intoUnvanquished:masterfrom
slipher:freetype-fix
Jan 17, 2025
Merged

Fix Freetype mess, MinGW native gamelogic build#3293
slipher merged 1 commit intoUnvanquished:masterfrom
slipher:freetype-fix

Conversation

@slipher
Copy link
Contributor

@slipher slipher commented Jan 12, 2025

06453a8 does a regression of finding Freetype (and populating the variables) only if "NOT BUILD_CLIENT". We always need to find and set it regardless of what happened in Daemon's CMakeLists! It still worked sometimes because rmlui.cmake had a duplicate call to find_package(Freetype). But rmlui.cmake does not link zlib which is supposed to be a dependency of the external_deps Freetype builds used on Windows and Mac.

Note: with some toolchains the build can succeed even if the zlib dependency is not provided. This happens with Visual Studio and I've seen it on Mac too. I think it must depend on whether the linker removes unused symbols or resolves dependencies first. For MinGW you actually have to link zlib to build.

06453a8 does a regression of finding
Freetype (and populating the variables) only if "NOT BUILD_CLIENT".
We always need to find and set it regardless of what happened in
Daemon's CMakeLists! It still worked sometimes because rmlui.cmake had a
duplicate call to find_package(Freetype). But rmlui.cmake does not link
zlib which is supposed to be a dependency of the external_deps Freetype
builds used on Windows and Mac.

Note: with some toolchains the build can succeed even if the zlib
dependency is not provided. This happens with Visual Studio and I've
seen it on Mac too. I think it must depend on whether the linker removes
unused symbols or resolves dependencies first. For MinGW you actually
have to link zlib to build.
Copy link
Member

@illwieckz illwieckz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@slipher slipher merged commit 675e916 into Unvanquished:master Jan 17, 2025
9 checks passed
@slipher slipher deleted the freetype-fix branch January 17, 2025 00:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants