Skip to content

Commit e4cbf6b

Browse files
authored
make glfw consistent (#5583)
1 parent 43d8933 commit e4cbf6b

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

examples/Makefile

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,11 @@ BUILD_MODE ?= RELEASE
9090
# Use external GLFW library instead of rglfw module
9191
USE_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
95100
SDL_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

0 commit comments

Comments
 (0)