-
Notifications
You must be signed in to change notification settings - Fork 397
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
Fix CMake Glib detection #442
Conversation
Restores the original `FindGLib2.cmake` file with two modifications: First, `FOUND_VAR` has been removed (it's ignored anyway). Second, I set `set(FPHSA_NAME_MISMATCHED TRUE)` because `find_package_handle_standard_args` is called for each component and the mismatched names are expected.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't really see the value of maintaining a FindGlib2.cmake
file over just using pkg-config to find glib, but I'm also not opposed to these changes either.
Yes, to be fair I think it's a minor improvement, mostly that you only need to |
Co-authored-by: Tim Perkins <[email protected]>
I agree that it's nice having less noise in the
I am not a cmake expert either, but it does seem like the winds are shifting towards relying on pkg-config more for finding dependencies rather than custom I'm interested in reopening this discussion because it seems that pkg-config is able to find Glib in environments when our @tprk77 how would you feel about switching to using pkgconfig to find Glib? Alternatively, would you be able to add some additional support to the Thanks in advance for your input! |
I don't really put much stock in SO, I've seen plenty of misguided or just plain bad answers there. Anyway, I do not think those comments indicate a trend. I would look to the maintainers of CMake to see what they recommend, and for this we have the documentation: https://cmake.org/cmake/help/book/mastering-cmake/chapter/Finding%20Packages.html You will notice they describe how to write a configuration file. They do not even mention
I am not necessary opposed to At some point, someone showed up to modernize the build system. Part of the promise was that the build would now be cross-platform. That is to say, we would have a proper Windows build. Not using MinGW or WSL or whatever, an actual Windows build that would work in Visual Studio. Another benefit was that no one would have to mess around with M4 anymore. This guy did the work, but eventual moved to other things. And it turns out not many people care about Windows (myself included), so the Windows stuff fell into disrepair. But here's the thing: Windows doesn't have Anyway, I think you new maintainers have said previously that you are giving up on a proper Windows build, and only a MinGW build is supported. (Which is fine with me, I don't even use Windows.) And in that case, maybe it makes sense to leverage |
@tprk77 Thanks for the swift response! You make some good points so what do you think about an in-between path? I could modify #520 to leave |
Yeah, I think this is good! I think some other open source projects do a similar thing. |
Restores the original
FindGLib2.cmake
file with two modifications: First,FOUND_VAR
has been removed (it's ignored anyway). Second, I setset(FPHSA_NAME_MISMATCHED TRUE)
becausefind_package_handle_standard_args
is called for each component and the mismatched names are expected.