xmake-repo icon indicating copy to clipboard operation
xmake-repo copied to clipboard

Allow full static linking and runtime wayland/x11 detection on linux.

Open ghost opened this issue 1 year ago • 2 comments

Is your feature request related to a problem? Please describe.

Trying to use GLFW on wayland is not possible via xmake which is quite irritating.

Describe the solution you'd like

GLFW allows dynamically selecting between X11 and Wayland at runtime which would both make the binaries more portable and fix the glfw on wayland via xmake issue. Changing linux configuration would allow full static builds with this feature.

Describe alternatives you've considered

adding wayland as a feature is possible but it makes xmake configuration for glfw for linux worse [ as you will have to statically choose between X11/wayland]. Plus the binaries produced will not be statically linked and would also pollute the glfw.xmake file.

Additional context

No response

ghost avatar Feb 25 '24 18:02 ghost

you can open a pr to support it.

add wayland/x11 configs and switch them in on_install.

https://github.com/xmake-io/xmake-repo/blob/dde3ebbbc3f931d17af3b3f14bcb3786f188b659/packages/g/glfw/xmake.lua#L17

https://github.com/xmake-io/xmake-repo/blob/dde3ebbbc3f931d17af3b3f14bcb3786f188b659/packages/g/glfw/xmake.lua#L32

waruqi avatar Feb 26 '24 02:02 waruqi

GLFW 3.4 has been released and I will have to add that instead..

ghost avatar Feb 27 '24 09:02 ghost