Support Wayland display on Linux desktop
This commit is contained in:
parent
b19e155b34
commit
7965f983ba
@ -29,15 +29,19 @@ PLATFORM ?= PLATFORM_DESKTOP
|
|||||||
RAYLIB_PATH ?= ..
|
RAYLIB_PATH ?= ..
|
||||||
PROJECT_NAME ?= raylib_example
|
PROJECT_NAME ?= raylib_example
|
||||||
|
|
||||||
ifeq ($(PLATFORM),PLATFORM_RPI)
|
# Library type used for raylib: STATIC (.a) or SHARED (.so/.dll)
|
||||||
RAYLIB_PATH ?= /home/pi/raylib
|
RAYLIB_LIBTYPE ?= STATIC
|
||||||
endif
|
|
||||||
|
|
||||||
# Use external GLFW library instead of rglfw module
|
# Use external GLFW library instead of rglfw module
|
||||||
USE_EXTERNAL_GLFW ?= FALSE
|
USE_EXTERNAL_GLFW ?= FALSE
|
||||||
|
|
||||||
# Library type used for raylib: STATIC (.a) or SHARED (.so/.dll)
|
# Use Wayland display server protocol on Linux desktop
|
||||||
RAYLIB_LIBTYPE ?= STATIC
|
# by default it uses X11 windowing system
|
||||||
|
USE_WAYLAND_DISPLAY ?= FALSE
|
||||||
|
|
||||||
|
ifeq ($(PLATFORM),PLATFORM_RPI)
|
||||||
|
RAYLIB_PATH ?= /home/pi/raylib
|
||||||
|
endif
|
||||||
|
|
||||||
# Determine PLATFORM_OS in case PLATFORM_DESKTOP selected
|
# Determine PLATFORM_OS in case PLATFORM_DESKTOP selected
|
||||||
ifeq ($(PLATFORM),PLATFORM_DESKTOP)
|
ifeq ($(PLATFORM),PLATFORM_DESKTOP)
|
||||||
@ -223,7 +227,9 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP)
|
|||||||
#LDLIBS += -lXrandr -lXinerama -lXi -lXxf86vm -lXcursor
|
#LDLIBS += -lXrandr -lXinerama -lXi -lXxf86vm -lXcursor
|
||||||
|
|
||||||
# On Wayland windowing system, additional libraries requires
|
# On Wayland windowing system, additional libraries requires
|
||||||
#LDLIBS += -lwayland-client -lwayland-cursor -lwayland-egl -lxkbcommon
|
ifeq ($(USE_WAYLAND_DISPLAY),TRUE)
|
||||||
|
LDLIBS += -lwayland-client -lwayland-cursor -lwayland-egl -lxkbcommon
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
ifeq ($(PLATFORM_OS),OSX)
|
ifeq ($(PLATFORM_OS),OSX)
|
||||||
# Libraries for OSX 10.9 desktop compiling
|
# Libraries for OSX 10.9 desktop compiling
|
||||||
|
16
src/Makefile
16
src/Makefile
@ -54,12 +54,16 @@ RAYLIB_LIBTYPE ?= STATIC
|
|||||||
# NOTE: Some programs like tools could not require audio support
|
# NOTE: Some programs like tools could not require audio support
|
||||||
INCLUDE_AUDIO_MODULE ?= TRUE
|
INCLUDE_AUDIO_MODULE ?= TRUE
|
||||||
|
|
||||||
# Force OpenAL Soft backend for audio
|
# Use OpenAL Soft backend for audio
|
||||||
USE_OPENAL_BACKEND ?= FALSE
|
USE_OPENAL_BACKEND ?= FALSE
|
||||||
|
|
||||||
# Use external GLFW library instead of rglfw module
|
# Use external GLFW library instead of rglfw module
|
||||||
USE_EXTERNAL_GLFW ?= FALSE
|
USE_EXTERNAL_GLFW ?= FALSE
|
||||||
|
|
||||||
|
# Use Wayland display server protocol on Linux desktop
|
||||||
|
# by default it uses X11 windowing system
|
||||||
|
USE_WAYLAND_DISPLAY ?= FALSE
|
||||||
|
|
||||||
# OpenAL Soft audio backend forced on HTML5 and OSX (see below)
|
# OpenAL Soft audio backend forced on HTML5 and OSX (see below)
|
||||||
ifeq ($(PLATFORM),PLATFORM_WEB)
|
ifeq ($(PLATFORM),PLATFORM_WEB)
|
||||||
USE_OPENAL_BACKEND = TRUE
|
USE_OPENAL_BACKEND = TRUE
|
||||||
@ -287,10 +291,20 @@ ifeq ($(RAYLIB_LIBTYPE),SHARED)
|
|||||||
CFLAGS += -fPIC -DBUILD_LIBTYPE_SHARED
|
CFLAGS += -fPIC -DBUILD_LIBTYPE_SHARED
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# Use OpenAL Soft backend instead of mini_al
|
||||||
ifeq ($(USE_OPENAL_BACKEND),TRUE)
|
ifeq ($(USE_OPENAL_BACKEND),TRUE)
|
||||||
CFLAGS += -DUSE_OPENAL_BACKEND
|
CFLAGS += -DUSE_OPENAL_BACKEND
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# Use Wayland display on Linux desktop
|
||||||
|
ifeq ($(PLATFORM),PLATFORM_DESKTOP)
|
||||||
|
ifeq ($(PLATFORM_OS), LINUX)
|
||||||
|
ifeq ($(USE_WAYLAND_DISPLAY),TRUE)
|
||||||
|
CFLAGS += -D_GLFW_WAYLAND
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
# Define include paths for required headers
|
# Define include paths for required headers
|
||||||
# NOTE: Several external required libraries (stb and others)
|
# NOTE: Several external required libraries (stb and others)
|
||||||
INCLUDE_PATHS = -I. -Iexternal -Iexternal/glfw/include
|
INCLUDE_PATHS = -I. -Iexternal -Iexternal/glfw/include
|
||||||
|
Loading…
Reference in New Issue
Block a user