only compile rmodels if it's supported

This commit is contained in:
Colin James Wood 2026-05-21 12:59:45 +01:00
parent 65c6af290b
commit a4b29d9e80

View File

@ -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()
# <root>/cmake/GlfwImport.cmake handles the details around the inclusion of glfw
if (NOT ${PLATFORM} MATCHES "Web")
include(GlfwImport)