From a4b29d9e80ef7fdeac8e0d0c4d1b577943b83379 Mon Sep 17 00:00:00 2001 From: Colin James Wood Date: Thu, 21 May 2026 12:59:45 +0100 Subject: [PATCH] only compile rmodels if it's supported --- src/CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 8a790df80..55428e882 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -31,7 +31,6 @@ set(raylib_public_headers # Sources to be compiled set(raylib_sources rcore.c - rmodels.c rshapes.c rtext.c rtextures.c @@ -42,6 +41,11 @@ if (NOT DEFINED SUPPORT_MODULE_RAUDIO OR SUPPORT_MODULE_RAUDIO) list(APPEND raylib_sources raudio.c) endif() +# Only build rmodels if it's enabled +if (NOT DEFINED SUPPORT_MODULE_RMODELS OR SUPPORT_MODULE_RMODELS) + list(APPEND raylib_sources rmodels.c) +endif() + # /cmake/GlfwImport.cmake handles the details around the inclusion of glfw if (NOT ${PLATFORM} MATCHES "Web") include(GlfwImport)