Skip to content

Conversation

@crueter
Copy link
Contributor

@crueter crueter commented Jan 14, 2026

Much like the prior xxhash PR. This one also has the advantage of making
it completely trivial to handle distros that also install zy{dis,core}-config.cmake
alongside the PkgConfig files (Gentoo being one of them, tested it
here).

Signed-off-by: crueter [email protected]

Much like the prior xxhash PR. This one also has the advantage of making
it completely trivial to handle distros that also install zy{dis,core}-config.cmake
alongside the PkgConfig files (Gentoo being one of them, tested it
here).

Signed-off-by: crueter <[email protected]>
@pmatos
Copy link
Collaborator

pmatos commented Jan 15, 2026

This was what I originally implemented but according to @neobrain this is not a good idea as some distros don't ship cmake files.

@crueter
Copy link
Contributor Author

crueter commented Jan 15, 2026

This was what I originally implemented but according to @neobrain this is not a good idea as some distros don't ship cmake files.

That's why I have the fallback:

find_package(Zycore QUIET CONFIG)

if (Zycore_CONSIDERED_CONFIGS)
    find_package_handle_standard_args(Zycore CONFIG_MODE)
else()

Basically if it finds a zycore-config.cmake, it will set Zycore_CONSIDERED_CONFIGS to ON and then find_package_handle_standard_args will pass that to the caller. If it doesn't find a zycore-config.cmake it sets Zycore_CONSIDERED_CONFIGS to OFF and goes through the standard pkgconfig procedure.

I tested on a distro without CMake files for zy* and it worked fine, though of course more tests on Fedora and the like would be nice.

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.

2 participants