Removes the redundant USE_AUDIO flag (#4158)

This commit is contained in:
Lázaro Albuquerque 2024-07-16 08:16:41 -04:00 committed by GitHub
parent 0c03cbff90
commit 24726a4bc2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 5 deletions

View File

@ -11,7 +11,6 @@ endfunction()
if(${CUSTOMIZE_BUILD}) if(${CUSTOMIZE_BUILD})
target_compile_definitions("raylib" PRIVATE EXTERNAL_CONFIG_FLAGS) target_compile_definitions("raylib" PRIVATE EXTERNAL_CONFIG_FLAGS)
define_if("raylib" USE_AUDIO)
foreach(FLAG IN LISTS CONFIG_HEADER_FLAGS) foreach(FLAG IN LISTS CONFIG_HEADER_FLAGS)
string(REGEX MATCH "([^=]+)=(.+)" _ ${FLAG}) string(REGEX MATCH "([^=]+)=(.+)" _ ${FLAG})

View File

@ -29,6 +29,7 @@ set(raylib_public_headers
# Sources to be compiled # Sources to be compiled
set(raylib_sources set(raylib_sources
raudio.c
rcore.c rcore.c
rmodels.c rmodels.c
rshapes.c rshapes.c
@ -47,14 +48,12 @@ endif ()
# Produces a variable LIBS_PRIVATE that will be used later # Produces a variable LIBS_PRIVATE that will be used later
include(LibraryConfigurations) include(LibraryConfigurations)
if (USE_AUDIO) if (SUPPORT_MODULE_RAUDIO)
MESSAGE(STATUS "Audio Backend: miniaudio") MESSAGE(STATUS "Audio Backend: miniaudio")
list(APPEND raylib_sources raudio.c)
else () else ()
MESSAGE(STATUS "Audio Backend: None (-DUSE_AUDIO=OFF)") MESSAGE(STATUS "Audio Backend: None (-DCUSTOMIZE_BUILD=ON -DSUPPORT_MODULE_RAUDIO=OFF)")
endif () endif ()
add_library(raylib ${raylib_sources} ${raylib_public_headers}) add_library(raylib ${raylib_sources} ${raylib_public_headers})
if (NOT BUILD_SHARED_LIBS) if (NOT BUILD_SHARED_LIBS)