Repair discord support and enable opus for windows by default

This commit is contained in:
NepDisk 2025-03-20 23:19:22 -04:00
parent 9ca6075a9e
commit 863fa76c25
4 changed files with 10 additions and 1 deletions

View file

@ -71,6 +71,7 @@ cmake_dependent_option(
OFF "NOT SRB2_CONFIG_SYSTEM_LIBRARIES"
OFF
)
option(SRB2_CONFIG_ENABLE_DISCORDRPC "Enable Discord RPC features" ON)
option(SRB2_CONFIG_HWRENDER "Enable hardware render (OpenGL) support" ON)
option(SRB2_CONFIG_STATIC_OPENGL "Enable static linking GL (do not do this)" OFF)
option(SRB2_CONFIG_ERRORMODE "Compile C code with warnings treated as errors." OFF)

View file

@ -99,6 +99,13 @@ target_link_libraries(SRB2SDL2 PRIVATE tcbrindle::span)
target_link_libraries(SRB2SDL2 PRIVATE fmt::fmt-header-only)
target_link_libraries(SRB2SDL2 PRIVATE Tracy::TracyClient)
target_compile_definitions(SRB2SDL2 PRIVATE -DUSE_STUN)
if(SRB2_CONFIG_ENABLE_DISCORDRPC)
target_link_libraries(SRB2SDL2 PRIVATE DiscordRPC::DiscordRPC)
target_compile_definitions(SRB2SDL2 PRIVATE -DHAVE_DISCORDRPC)
target_sources(SRB2SDL2 PRIVATE discord.c)
endif()
set(SRB2_HAVE_THREADS ON)
target_compile_definitions(SRB2SDL2 PRIVATE -DHAVE_THREADS)

View file

@ -130,3 +130,4 @@ k_director.c
k_follower.c
k_mapuser.c
k_stats.c
stun.c

View file

@ -45,7 +45,7 @@ if(NOT "${SRB2_CONFIG_SYSTEM_LIBRARIES}")
"SDL2MIXER_MP3 ON"
"SDL2MIXER_MP3_DRMP3 ON"
"SDL2MIXER_MIDI ON"
"SDL2MIXER_OPUS OFF"
"SDL2MIXER_OPUS ON"
"SDL2MIXER_VORBIS STB"
"SDL2MIXER_WAVE ON"
)