Update cgo

This commit is contained in:
Milan Nikolic 2024-02-26 09:29:23 +01:00
parent 83c4beb421
commit caf96ad1c0
No known key found for this signature in database
GPG key ID: 9229D0EAA3AA4E75
5 changed files with 25 additions and 39 deletions

View file

@ -12,17 +12,14 @@ package rl
#include "external/glfw/src/vulkan.c"
#include "external/glfw/src/window.c"
#ifdef _GLFW_WAYLAND
#include "external/glfw/src/wl_init.c"
#include "external/glfw/src/wl_monitor.c"
#include "external/glfw/src/wl_window.c"
#endif
#ifdef _GLFW_X11
#include "external/glfw/src/x11_init.c"
#include "external/glfw/src/x11_monitor.c"
#include "external/glfw/src/x11_window.c"
#include "external/glfw/src/glx_context.c"
#endif
#include "external/glfw/src/linux_joystick.c"
#include "external/glfw/src/posix_module.c"
@ -33,16 +30,15 @@ package rl
#include "external/glfw/src/egl_context.c"
#include "external/glfw/src/osmesa_context.c"
#cgo linux CFLAGS: -Iexternal/glfw/include -DPLATFORM_DESKTOP -Wno-stringop-overflow
GLFWbool _glfwConnectNull(int platformID, _GLFWplatform* platform) {
return GLFW_TRUE;
}
#cgo linux,!wayland LDFLAGS: -lm -pthread -ldl -lrt -lX11
#cgo linux,wayland LDFLAGS: -lm -pthread -ldl -lrt -lwayland-client -lwayland-cursor -lwayland-egl -lxkbcommon
#cgo linux CFLAGS: -Iexternal/glfw/include -DPLATFORM_DESKTOP -D_GLFW_WAYLAND -D_GLFW_X11 -Wno-stringop-overflow
#cgo linux LDFLAGS: -lm -pthread -ldl -lrt -lwayland-client -lwayland-cursor -lwayland-egl -lxkbcommon
#cgo linux,!es2,!es3 LDFLAGS: -lGL
#cgo linux,!wayland CFLAGS: -D_GLFW_X11
#cgo linux,wayland CFLAGS: -D_GLFW_WAYLAND
#cgo linux,opengl11,!es2,!es3 CFLAGS: -DGRAPHICS_API_OPENGL_11
#cgo linux,opengl21,!es2,!es3 CFLAGS: -DGRAPHICS_API_OPENGL_21
#cgo linux,opengl43,!es2,!es3 CFLAGS: -DGRAPHICS_API_OPENGL_43