-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
cmake config files #1009
Comments
There is a CMakeLists.txt file in zlib. What are you proposing? |
The CMakeLists.txt included with zlib is for building zlib. I'm hoping @imrichardcole is suggesting a CMake module file that is distributed with the (pre-)built zlib library that makes it easier for downstream builds to locate the zlib header and lib files. Downstream builds would use CMake's find_package function to locate zlib by name only and avoid having to hardcode paths and use fixed locations. We create our own zlib CMake module file when we build zlib in our CI system, so I for one would welcome such a contribution from imricharcole. |
Yes, exactly as @Mr-Clam says. This is for the scenario where you want to use a pre-built zlib, rather than include the CMakeLists.txt and build as though it's part of your own source tree. It removes a need for custom FindZlib.cmake files (which was what alerted me to the issue in the first place) I pretty much have a PR ready to go, it might be easier to understand when you see it. |
@imrichardcole there's an open PR that addresses this: #1004 👍 |
A lot of modern libraries now ship their own cmake config files, this reduces finding the package to pretty much just:
Has this ever been considered for zlib? Happy to raise a PR if so.
The text was updated successfully, but these errors were encountered: