Skip to content

Commit

Permalink
cmake: add support for modplug library
Browse files Browse the repository at this point in the history
it is used only when xmp and mikmod were not found
  • Loading branch information
alexey-lysiuk committed Jan 7, 2025
1 parent f9c0016 commit 3acda0a
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@ set(COMMON_SOURCES
Quake/snd_mikmod.c
Quake/snd_mikmod.h
Quake/snd_mix.c
Quake/snd_modplug.c
Quake/snd_modplug.h
Quake/snd_mp3.h
Quake/snd_mp3tag.c
Quake/snd_opus.c
Expand Down Expand Up @@ -678,6 +680,14 @@ if(NOT XMP_FOUND)
LIBRARIES mikmod
DEFINES USE_CODEC_MIKMOD
)

if(NOT MIKMOD_FOUND)
find_codec(NAME MODPLUG
HEADER libmodplug/modplug.h
LIBRARIES modplug
DEFINES USE_CODEC_MODPLUG
)
endif()
endif()

if(CMAKE_CROSSCOMPILING)
Expand Down

0 comments on commit 3acda0a

Please sign in to comment.