Skip to content
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

Fix: zlib fallback not working #772

Merged

Conversation

TheLastRar
Copy link
Contributor

Description of Changes

When Launcher_FORCE_BUNDLED_LIBS is not defined, the zlib submodule will fail to load due to the nature of cached values and find_package.

This can be fixed by forcing ZLIB_INCLUDE_DIR, however subsequent configurations will cause builds to fail as the first find_package will succeed due to cached variables.

Add a new cmake cached variable FORCE_BUNDLED_ZLIB which gets set when bundled zlib is required, which is checked on subsequent configurations to ensure the zlib submodule is correctly loaded.

Suggested Testing Steps

Test cmake configuration & build without a system installed zlib, and without Launcher_FORCE_BUNDLED_LIBS.
Reconfigure cmake & build to ensure subsequent configurations still function.
Check CI.

CMakeLists.txt Outdated Show resolved Hide resolved
Signed-off-by: TheLastRar <TheLastRar@users.noreply.github.com>
Copy link
Contributor

@flowln flowln left a comment

Choose a reason for hiding this comment

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

thanks!

@flowln flowln added the bug Something isn't working label Jan 22, 2023
@flowln flowln added this to the 6.2 milestone Jan 22, 2023
Copy link
Member

@Scrumplex Scrumplex left a comment

Choose a reason for hiding this comment

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

lgtm, thanks!

@Scrumplex Scrumplex merged commit cefa166 into PrismLauncher:develop Jan 22, 2023
@TheLastRar TheLastRar deleted the zlib-fallback-bundled-fix branch January 23, 2023 10:25
Scrumplex added a commit that referenced this pull request Feb 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants