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

Make building examples optional #441

Closed
wants to merge 1 commit into from

Conversation

ssrobins
Copy link

I'm not directly programming with zlib, I'm just building it to satisfy the dependency in SDL2. Therefore, I have no reason to build the 'example' and 'minigzip' executables.

In addition, I get build errors on iOS if I don't have the following target properties set:
MACOSX_BUNDLE TRUE
XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY
XCODE_ATTRIBUTE_DEVELOPMENT_TEAM

The first property would be easy to set in zlib, but the last two are unique to my Apple dev account and while it could be a variable I could pass into zlib, I think the cleaner and more generic way is just to have options available to disable building these executables altogether.

So I've added BUILD_ZLIB_EXAMPLE and BUILD_ZLIB_MINIGZIP options that I've set to ON by default. This will ensure no behavior change by default. In an upstream CMake file in my project, I've set them to off so they no longer build.

@ssrobins
Copy link
Author

ssrobins commented Nov 8, 2022

Build errors on iOS up going away, either due to zlib or Xcode upgrades since then. Closing this.

@ssrobins ssrobins closed this Nov 8, 2022
@Neustradamus Neustradamus mentioned this pull request Jan 1, 2025
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.

1 participant