-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
giflib: Fix build issue on recent Android NDK versions #25956
Conversation
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 was really confused at first sight because I thought you were defining a maximum CMake version but I see now that the ...
defines the maximum CMake policy (and not version). And it is also backwards compatible!
Looks good to me, thank you!
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.
Need to use a newer minimum policy version instead of capping the maximum one.
Co-authored-by: Martin Valgur <martin.valgur@gmail.com>
@valgur I've updated to the minimum of 3.15 as suggested, but my previous solution didn't cap the maximum to 3.31 any more than the old code capped it to 3.1 - the second version in the version range is used to apply newer CMake policies up to a certain version to indicate wider tested compatibility across a range of versions and doesn't in any way limit using newer versions. |
I have made some recipe refactor. |
Summary
Changes to recipe: giflib/5.2.x
Sets a maximum CMake policy version of 3.31.0 alongside the existing minimum of 3.1 to fix build issues when using recent Android NDKs that require CMake policies from 3.3.
Motivation
Without this patch, trying to use giflib in an Android ndk r27 project results in the following error:
Details
Added a backwards-compatible "maximum policy version" as recommended by https://cmake.org/cmake/help/latest/command/cmake_minimum_required.html. The CMake file is really simple, and testing it with current CMake 3.31 revealed no compatibility warnings or issues after bumping the version. I've tested a local conan build on macOS 14.7 + Xcode 16 and successfully cross-compiled to Android using NDK r27.