-
-
Notifications
You must be signed in to change notification settings - Fork 956
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
Plugin header overhaul 2: fixes (Electric boogaloo) #2201
Conversation
cc @horriblename @eli-schwartz @fufexan cmake / makefile side is done, we just pretty much need meson to copy Ref: Line 59 in 7138de7
|
wlroots installs these files here: https://gitlab.freedesktop.org/wlroots/wlroots/-/blob/master/include/meson.build#L27 wlroots wants them in /usr/include 🤷 Either start supporting the system wlroots or idk, fork and patch it or something. I strongly encourage supporting the system wlroots, but I'm given to understand that option has been vehemently nixed... |
We don't install those headers AFAIK? We absolutely shouldn't and cmake doesn't. System wlroots -> /usr/include I mean, we can always just execute a shell command with meson as a last resort, if meson really can't do that, I assume? They are not for wlroots anyways. They're for plugins. If a plugin includes a hyprland header, it should source wlroots headers from the hyprland headers. |
Using system wlroots only makes sense, if there is only one wlroots compositor using it. By default if you don't tell meson to "install --skip-subprojects" then it tries to put the subproject files in /usr/include/wlroots for example. I'm not sure about changing the default install dir in a subproject |
IDK, but this has to be solved. We can skip meson for now and just request users to run As usual, my decision ages ago to allow meson comes back to bite me in the ass. If meson does not support this, we can always nuclearly On that note, how does meson handle the wlroots .so? Wouldn't "no modifications" make it overwrite system wlroots? |
You can indeed use meson to execute Or even use an https://github.com/hyprwm/wlroots/ fork with some patches applied, and then not have to mess with sed for either cmake or meson. |
I'll pass, too much hassle + will make people want me to apply patches myself, which I hella don't want to do.
If that's the only way to accomplish installing wlroots headers to a different location with meson, let it be. I'll leave the decision to @fufexan |
I'll merge the cmake + makefile part for now and edit the wiki so that we can get plugins to work again, and the meson stuff I'll leave as @fufexan 's job |
I have come up with a relatively small change to the wlroots diff --git a/include/meson.build b/include/meson.build
index e6698003..687786b8 100644
--- a/include/meson.build
+++ b/include/meson.build
@@ -1,4 +1,5 @@
-subdir('wlr')
+run_command('ln', '-s', join_paths(meson.project_source_root(), 'include', 'wlr'), join_paths(meson.project_source_root(), 'include', 'wlroots'), check: true)
+subdir('wlroots')
exclude_files = ['meson.build', 'config.h.in', 'version.h.in']
if not features.get('drm-backend')
@@ -24,8 +25,8 @@ if not features.get('session')
exclude_files += 'backend/session.h'
endif
-install_subdir('wlr',
- install_dir: get_option('includedir'),
+install_subdir('wlroots',
+ install_dir: join_paths(get_option('includedir'), 'hyprland'),
exclude_files: exclude_files,
)
|
All wraps start off written by hand :P some of them are then shared publicly so that other people can take advantage of existing work rather than reinventing it. |
@eli-schwartz I've tried making a wrap file but it does not seem to be doing anything. Am I doing it wrong, do I need to fetch the submodule through the wrap file? |
|
Fixes for the plugin overhaul:
make pluginenv
makes sense$PREFIX/include/hyprland/wlroots
(./subprojects/wlroots/include
->$PREFIX/include/hyprland/wlroots
)Todo: