Add CMake building support

This commit is contained in:
Tera << 8 2025-06-07 18:58:42 -04:00
parent a77f0c6c77
commit 07c5e54f59
Signed by: imterah
GPG key ID: 8FA7DD57BA6CEA37
4 changed files with 21 additions and 12 deletions

View file

@ -634,13 +634,8 @@ OBJS = rcore.o \
rshapes.o \
rtextures.o \
rtext.o \
utils.o
utils.o
ifeq ($(TARGET_PLATFORM),PLATFORM_DRM)
ifeq ($(ENABLE_WAYLAND_DRM_LEASING),yes)
OBJS += drm-lease-v1.o
endif
endif
ifeq ($(TARGET_PLATFORM),PLATFORM_DESKTOP_GLFW)
ifeq ($(USE_EXTERNAL_GLFW),FALSE)
OBJS += rglfw.o
@ -738,10 +733,6 @@ rcore.o : platforms/*.c
rcore.o : rcore.c raylib.h rlgl.h utils.h raymath.h rcamera.h rgestures.h
$(CC) -c $< $(CFLAGS) $(INCLUDE_PATHS)
# Compile Wayland DRM leasing module
drm-lease-v1.o : platforms/drm-lease-v1.c
$(CC) -c $< $(CFLAGS) $(INCLUDE_PATHS)
# Compile rglfw module
rglfw.o : rglfw.c
$(CC) $(GLFW_OSX) -c $< $(CFLAGS) $(INCLUDE_PATHS)

View file

@ -82,7 +82,11 @@
#if defined(ENABLE_WAYLAND_DRM_LEASING)
#include "wayland-client.h" // Wayland client. Used to do DRM leasing.
#include "drm-lease-v1.h"
// DRM leasing protocol that's used
#if defined(ENABLE_WAYLAND_DRM_LEASING)
#include "drm-lease-v1.c"
#include "drm-lease-v1.h"
#endif
#endif
#ifndef EGL_OPENGL_ES3_BIT