File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -30,14 +30,22 @@ set(raylib_public_headers
3030
3131# Sources to be compiled
3232set (raylib_sources
33- raudio.c
3433 rcore.c
35- rmodels.c
3634 rshapes.c
3735 rtext.c
3836 rtextures.c
3937 )
4038
39+ # Only build raudio if it's enabled
40+ if (NOT DEFINED SUPPORT_MODULE_RAUDIO OR SUPPORT_MODULE_RAUDIO)
41+ list (APPEND raylib_sources raudio.c)
42+ endif ()
43+
44+ # Only build rmodels if it's enabled
45+ if (NOT DEFINED SUPPORT_MODULE_RMODELS OR SUPPORT_MODULE_RMODELS)
46+ list (APPEND raylib_sources rmodels.c)
47+ endif ()
48+
4149# <root>/cmake/GlfwImport.cmake handles the details around the inclusion of glfw
4250if (NOT ${PLATFORM} MATCHES "Web" )
4351 include (GlfwImport )
@@ -48,10 +56,10 @@ endif ()
4856# Produces a variable LIBS_PRIVATE that will be used later
4957include (LibraryConfigurations )
5058
51- if (SUPPORT_MODULE_RAUDIO)
52- MESSAGE (STATUS "Audio Backend: miniaudio" )
53- else ()
59+ if (DEFINED SUPPORT_MODULE_RAUDIO AND NOT SUPPORT_MODULE_RAUDIO)
5460 MESSAGE (STATUS "Audio Backend: None (-DCUSTOMIZE_BUILD=ON -DSUPPORT_MODULE_RAUDIO=OFF)" )
61+ else ()
62+ MESSAGE (STATUS "Audio Backend: miniaudio" )
5563endif ()
5664
5765add_library (raylib ${raylib_sources} ${raylib_public_headers} )
You can’t perform that action at this time.
0 commit comments