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)