File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -90,6 +90,11 @@ BUILD_MODE ?= RELEASE
9090# Use external GLFW library instead of rglfw module
9191USE_EXTERNAL_GLFW ?= FALSE
9292
93+ # Enable support for X11 by default on Linux when using GLFW
94+ # NOTE: Wayland is disabled by default, only enable if you are sure
95+ GLFW_LINUX_ENABLE_WAYLAND ?= FALSE
96+ GLFW_LINUX_ENABLE_X11 ?= TRUE
97+
9398# PLATFORM_DESKTOP_SDL: It requires SDL library to be provided externally
9499# WARNING: Library is not included in raylib, it MUST be configured by users
95100SDL_INCLUDE_PATH ?= $(RAYLIB_SRC_PATH ) /external/SDL2/include
@@ -394,9 +399,11 @@ ifeq ($(TARGET_PLATFORM),PLATFORM_DESKTOP_GLFW)
394399 LDLIBS = -lraylib -lGL -lm -lpthread -ldl -lrt
395400
396401 # On Wayland, additional libraries requires
397- ifeq ($(USE_WAYLAND_DISPLAY ),TRUE)
402+ ifeq ($(GLFW_LINUX_ENABLE_WAYLAND ),TRUE)
398403 LDLIBS += -lwayland-client -lwayland-cursor -lwayland-egl -lxkbcommon
399- else
404+ endif
405+
406+ ifeq ($(GLFW_LINUX_ENABLE_X11),TRUE)
400407 # On X11, additional libraries required
401408 LDLIBS += -lX11
402409 # NOTE: It seems additional libraries are not required any more, latest GLFW just dlopen them
You can’t perform that action at this time.
0 commit comments