Skip to content

cmake build enhancements, mostly for windows, with some documentation#315

Closed
jeking3 wants to merge 1 commit intomadler:masterfrom
jeking3:msvc-cmake-enhancements
Closed

cmake build enhancements, mostly for windows, with some documentation#315
jeking3 wants to merge 1 commit intomadler:masterfrom
jeking3:msvc-cmake-enhancements

Conversation

@jeking3
Copy link
Copy Markdown

@jeking3 jeking3 commented Nov 22, 2017

Add cmake option declarations for the SKIP_INSTALL_* and other
options used in the build process.

Add an option BUILD_STATIC_AND_SHARED to the cmake build, default
ON to emulate past behavior, which when set to OFF allows one to
generate just one library from the build process. This is useful
on Windows where static and shared may want different compilation
flags to be optimal.

Add cmake install directives to get the PDB files for MSVC
Debug / RelWithDebInfo config builds placed into the
install bin directory.

Added cmake build documentation for zlib as well as a batch
file that can generate many different windows build configurations
to be used as an example.

This pull request would be even better with continuous integration.
I am going to work on a pull request for that next. Thanks!


if(WIN32)
# Creates zlib1.dll when building shared library version
set_target_properties(zlib PROPERTIES SUFFIX "1.dll")
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

#273 recommends a different approach - tagging so we don't lose track of it.

options used in the build process.

Add an option BUILD_STATIC_AND_SHARED to the cmake build, default
ON to emulate past behavior, which when set to OFF allows one to
generate just one library from the build process.  This is useful
on Windows where static and shared may want different compilation
flags to be optimal.

Add cmake install directives to get the PDB files for MSVC
Debug / RelWithDebInfo config builds placed into the
install bin directory.

Added cmake build documentation for zlib as well as a batch
file that can generate many different windows build configurations
to be used as an example.
@JonasVautherin
Copy link
Copy Markdown

As a Linux user (i.e. I cannot really review the Windows part), this PR makes sense to me.

Somehow it seems like @madler is not maintaining libz anymore, right? What should be done in such a case? Could @madler add another maintainer to this project (if somebody accepts to do it)? Or is there an active fork somewhere?

@madler
Copy link
Copy Markdown
Owner

madler commented Feb 2, 2025

See #1027 .

@madler madler closed this Feb 2, 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.

3 participants