This comment has been minimized.

In my use case, I want to link ZLIB statically. Currently the default implementation of FindZlib favours
a shared library and that gets hard coded into INTERFACE_LINK_LIBRARIES of generated libcurl-target.cmake which forces shared linkage for the client app too.

The transitive target gives more control to the library user to control whether to link statically or shared without relying on clumsy hacks.

Also in terms of future proofing if usage requirements of ZLIB for some reason change, they will be transitioned with the target to the client app rather than being decomposed to _LIBS and _INCLUDE_DIRS variables which might strip some of those requirements.

Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.