zlib icon indicating copy to clipboard operation
zlib copied to clipboard

Update cmake files to latest CMake.

Open WildCard65 opened this issue 4 years ago • 8 comments

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

WildCard65 avatar Jan 19 '21 01:01 WildCard65

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.

wrowe avatar Jan 19 '21 15:01 wrowe

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....

ScatteredRay avatar Jan 20 '21 02:01 ScatteredRay

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

WildCard65 avatar Apr 10 '21 23:04 WildCard65

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.

ScatteredRay avatar Apr 11 '21 00:04 ScatteredRay

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?

jnhyatt avatar Jun 15 '21 19:06 jnhyatt

@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

WildCard65 avatar Jun 16 '21 00:06 WildCard65

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

xakod avatar Feb 14 '22 13:02 xakod

@madler: Can you look?

Neustradamus avatar Oct 26 '22 04:10 Neustradamus