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

Update cmake files to latest CMake. #543

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

WildCard65
Copy link

@WildCard65 WildCard65 commented Jan 19, 2021

Minimum CMake version is 3.15 (For MSVC_RUNTIME_LIBRARY property)
Added CMake 3.19 CMakePresets.json for quick configuring.

Consumers can create a "CMakeUserPresets.json" to
configure zlib to their desires.

This PR includes content from the following: #310 #337 #343 #395 #471 #500 (Partial) #526

@wrowe
Copy link

wrowe commented Jan 19, 2021

cmake_minimum_required(VERSION 3.19)

is an incredibly disruptive change, and disrespectful of the entire userbase who don't happen to be at bleed. This includes every VisualStudio user who is using the bundled CMake 3.18, and many other legacy build environments who must pick up the newest zlib to patch security concerns. I'd ask you to please reconsider this contribution as an opt-in, not deprecate-most.

@ScatteredRay
Copy link

Just as a comment, it seems that building with a version older than 2.8.12 in the newest CMake get's a deprecation warning. Some change that updates to at least 2.8.12 seems at least important....

@WildCard65 WildCard65 force-pushed the update_cmake branch 3 times, most recently from b405738 to fe94a13 Compare April 10, 2021 23:58
@WildCard65
Copy link
Author

@ScatteredRay @wrowe I reduced the minimum requirement version down to 3.15, the restricting factor is now the MSVC_RUNTIME_LIBRARY target property.

@ScatteredRay
Copy link

3.15 seems reasonable to me, but I'm not keenly aware of other's usage. I'll try to give this a try in my codebase next week.

@WildCard65 WildCard65 force-pushed the update_cmake branch 2 times, most recently from 7d4b12d to 146fc75 Compare April 11, 2021 13:17
Minimum CMake version is 3.15 (For MSVC_RUNTIME_LIBRARY property)
Added CMake 3.19 CMakePresets.json for quick configuring.

Consumers can create a "CMakeUserPresets.json" to
configure zlib to their desires.
@jnhyatt
Copy link

jnhyatt commented Jun 15, 2021

I agree that 3.15 is quite disruptive, but at the same time, I'm disappointed with the lack of support for modern CMake paradigms. Many sources feel it's appropriate to report the lack of support as a bug. If upgrading to CMake 3.0 is out of the question, would a PR adding exported targets, etc. guarded by a version-check block for CMake 3.0 be accepted?

@WildCard65
Copy link
Author

@jnhyatt That's possible, I haven't tested the config file (that emulates FindZLIB.cmake), but the generated target files require at least 2.6

@xakod
Copy link

xakod commented Feb 14, 2022

This pr introduces better cmakelists than current awkward. Why not to rely on cmake 3.15?

@Neustradamus
Copy link

Neustradamus commented Oct 26, 2022

@madler: Can you look?

@Neustradamus Neustradamus mentioned this pull request Jul 30, 2023
@Vollstrecker Vollstrecker mentioned this pull request Dec 11, 2024
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.

6 participants