Fix build for Wayland
This commit is contained in:
parent
4101a15c47
commit
d6cda5d3bf
7 changed files with 1213 additions and 5 deletions
|
@ -14,6 +14,8 @@ package raylib
|
|||
#include "external/glfw/src/wl_init.c"
|
||||
#include "external/glfw/src/wl_monitor.c"
|
||||
#include "external/glfw/src/wl_window.c"
|
||||
#include "external/glfw/src/wayland-pointer-constraints-unstable-v1-client-protocol.c"
|
||||
#include "external/glfw/src/wayland-relative-pointer-unstable-v1-client-protocol.c"
|
||||
#endif
|
||||
#ifdef _GLFW_X11
|
||||
#include "external/glfw/src/x11_init.c"
|
||||
|
@ -28,17 +30,19 @@ package raylib
|
|||
#include "external/glfw/src/xkb_unicode.c"
|
||||
#include "external/glfw/src/egl_context.c"
|
||||
|
||||
#cgo linux LDFLAGS: -lGL -lm -pthread -ldl -lrt -lX11 -lXrandr -lXinerama -lXi -lXxf86vm -lXcursor
|
||||
#cgo linux CFLAGS: -Iexternal/glfw/include -DPLATFORM_DESKTOP
|
||||
|
||||
#cgo linux,!wayland LDFLAGS: -lGL -lm -pthread -ldl -lrt -lX11 -lXrandr -lXinerama -lXi -lXxf86vm -lXcursor
|
||||
#cgo linux,wayland LDFLAGS: -lGL -lm -pthread -ldl -lrt -lwayland-client -lwayland-cursor -lwayland-egl -lxkbcommon
|
||||
|
||||
#cgo linux,!wayland CFLAGS: -D_GLFW_X11
|
||||
#cgo linux,wayland CFLAGS: -D_GLFW_WAYLAND
|
||||
|
||||
#cgo linux,!noaudio LDFLAGS: -lopenal
|
||||
|
||||
#cgo linux,!static CFLAGS: -DSHARED_OPENAL
|
||||
#cgo linux,static CFLAGS: -DAL_LIBTYPE_STATIC
|
||||
|
||||
#cgo linux,!wayland CFLAGS: -D_GLFW_X11
|
||||
#cgo linux,wayland CFLAGS: -D_GLFW_WAYLAND
|
||||
|
||||
#cgo linux,opengl11 CFLAGS: -DGRAPHICS_API_OPENGL_11
|
||||
#cgo linux,opengl21 CFLAGS: -DGRAPHICS_API_OPENGL_21
|
||||
#cgo linux,!opengl11,!opengl21 CFLAGS: -DGRAPHICS_API_OPENGL_33
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue