-
Notifications
You must be signed in to change notification settings - Fork 38
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
meson: default the backends list to 'auto' #104
Conversation
cc @eli-schwartz for the inevitable meson magic that already exists for this and that I'm not aware of ;) |
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 dunno about "magic", but...
508c85b
to
3289fee
Compare
gentle ping |
gentle ping again |
3289fee
to
efe3fd5
Compare
monthly ping again |
@GeorgesStavracas - any chance we can merge this? Not having to manually supply the backends to build libportal from git is a rather nice feature. |
ping again? |
@eli-schwartz I'd actually like to hear your thoughts on the "auto" magic that's happening here. I'm not convinced this is a great idea. Or, at least, I'd love to hear what a Mesonic way to implement this would look like. |
@whot sorry, completely dropped the ball here |
My guess would be that the mesonic way would be to have each backend as separate feature option (instead of a "backends" array with a special string). That'd be easy enough to introduce but changes the build invocations. |
Yeah, adding a separate option for each one would be the most obvious way to handle it. If you want to keep the existing option, I guess you could make each option default to auto, and then use something like: backends = get_option('backends')
x_opt = 'x' in backends ? true : get_option('x')
y_opt = 'y' in backends ? true : get_option('y') The option will then usually be a feature option, but will be a boolean true (equal to enabled when used inside
Whichever one matches last. |
efe3fd5
to
56cf556
Compare
This removes the 'backends' option and replaces it with individual options for each backend, e.g. -Dbackend-gtk3=enabled. All backends become optional by default and are built if the dependencies are available. A summary is printed to list the actually enabled backends. This makes life easier for new users since the majority of them will not have GTK3, GTK4 and Qt5 headers installed by default and thus are almost guaranteed to run into a meson error on first configure. Fixes flatpak#94
56cf556
to
c0f7c77
Compare
Changed this PR to use |
This changes the 'backends' option to the special string 'auto' - all
backends become optional by default and are built if the dependencies
are available.
If need be this can be combined with explicitly listing a backend, so
backends=auto,gtk3 will require the GTK3 backend and optionally build
the Qt5 and GTK4 backends. A summary is printed to list the actually
enabled backends and a warning where no backends are enabled at all.
This makes life easier for new users since the majority of them will not
have GTK3, GTK4 and Qt5 headers installed by default and thus are almost
guaranteed to run into a meson error on first configure.
Fixes #94