-
Notifications
You must be signed in to change notification settings - Fork 212
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
Set some dependency options to be multi-choice. #1758
Conversation
54e5b2b
to
d9dd2ee
Compare
@fdintino , @wantehchang , what do you think? BTW, this is the official way of doing things: https://www.kitware.com//constraining-values-with-comboboxes-in-cmake-cmake-gui/ |
I like it. I've also seen projects accept paths for these options, to force find_package to look in a specific prefix. |
d9dd2ee
to
6e20d9b
Compare
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 am sorry I missed the review request.
Could you describe this change in the changelog?
Vincent: In addition to the changelog, please also update https://github.com/AOMediaCodec/libavif/blob/main/README.md. I think this is a good simplification of the cmake options. Thanks. |
c07124b
to
fe444ff
Compare
The current options are complex: - you want a local AOM, you need to set to variables (AVIF_CODEC_AOM and AVIF_LOCAL_AOM to ON) - they can be confusing: some work in best effort, e.g. if you do not AVIF_LOCAL_LIBYUV, it tries to find libyuv if not, oh well, too bad let's move on. - you cannot disable some options: if libyuv is found, use it! Oh wait, I actually never asked for it (causing issues like AOMediaCodec#1732) That's why I propose to set dependency options to: OFF: it will never be used whether it is findable or in ext LOCAL: it has to use the version in ext/ and will fail if not found SYSTEM: it will find_package it and fail if not found An AUTO version (that uses a dependency if found) should not be added as it will create more confusion for developers or package building.
Add backward compatibility
Update readme and changelog. Fix CMake comment.
fe444ff
to
6ac2459
Compare
6ac2459
to
ed14e34
Compare
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.
LGTM.
@@ -51,8 +52,9 @@ list of requirements. | |||
|
|||
If you want to statically link any codec into your local (static) build of | |||
libavif, building using one of these scripts and then enabling the associated | |||
`AVIF_LOCAL_*` is a convenient method, but you must make sure to disable | |||
`BUILD_SHARED_LIBS` in CMake to instruct it to make a static libavif library. | |||
`AVIF_LOCAL_*` and setting `AVIF_CODEC_*` to `LOCAL` is a convenient method, |
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.
The new text mentions both the old and new ways, connected by "and". I think we just need to mention the new way ("setting AVIF_CODEC_*
to LOCAL
"). If we mention both, they should be connected by "or" because one of them is sufficient.
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.
Thx, fixed in #1795 I believe
The current options are complex:
That's why I propose to set dependency options to: OFF: it will never be used whether it is findable or in ext LOCAL: it has to use the version in ext/ and will fail if not found SYSTEM: it will find_package it and fail if not found
An AUTO version (that uses a dependency if found) should not be added as it will create more confusion for developers or package building.
This is compatible with
ccmake
orcmake-gui
.