-
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 comes with FindZLIB and zlib ZLIBConfig and the targets they import are different. #366
Comments
Does zlib really create export files for config mode? I am not getting them when building current |
see #337 .... |
@johnb003 I would say the problem is madler who lets zlib not maintained and don't let us (the OSS community) having an OSS Community Modern CMake based build...
src: https://en.wikipedia.org/wiki/The_Cathedral_and_the_Bazaar Otherwise my 2 cents, mainly this: |
@madler: Can you look? |
Followed here madler#366
FindZLIB will import targets ZLIB::ZLIB. (https://github.com/Kitware/CMake/blob/master/Modules/FindZLIB.cmake)
However if zlib is built, it exports a ZLIBConfig that can import ZLIB::zlib (the case makes them different).
FindXXX is called "module mode", and XXXConfig is called "config mode". Module mode takes precedence over config mode, so while ZLIB appears to be exporting ZLIB::zlib, it won't be imported with find_package (unless the user specifies "CONFIG" to find package). However, this is problematic as most third party libraries assume it's on the system and will not do that, thus if you build it yourself you have to hand edit everything else that's building to link to the correct one.
I'd say this is a problem with cmake taking ownership. I've commented here, and if you're reading this, hop over and add your support.
https://gitlab.kitware.com/cmake/cmake/issues/16805
In the meantime maybe we should keep consistent with the interface cmake is providing?
The text was updated successfully, but these errors were encountered: