mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-27 04:21:47 +00:00
cmake: Add xmp-lite
This is a very lightweight module playback engine which will replace OpenMPT.
This commit is contained in:
parent
25e3b4239c
commit
210b513c8b
1 changed files with 60 additions and 0 deletions
60
thirdparty/CMakeLists.txt
vendored
60
thirdparty/CMakeLists.txt
vendored
|
|
@ -605,4 +605,64 @@ if(DiscordRPC_ADDED)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
CPMAddPackage(
|
||||||
|
NAME xmp-lite
|
||||||
|
VERSION 4.5.0
|
||||||
|
URL "https://github.com/libxmp/libxmp/releases/download/libxmp-4.5.0/libxmp-lite-4.5.0.tar.gz"
|
||||||
|
EXCLUDE_FROM_ALL ON
|
||||||
|
DOWNLOAD_ONLY ON
|
||||||
|
)
|
||||||
|
if(xmp-lite_ADDED)
|
||||||
|
set(xmp_sources
|
||||||
|
virtual.c
|
||||||
|
format.c
|
||||||
|
period.c
|
||||||
|
player.c
|
||||||
|
read_event.c
|
||||||
|
misc.c
|
||||||
|
dataio.c
|
||||||
|
lfo.c
|
||||||
|
scan.c
|
||||||
|
control.c
|
||||||
|
filter.c
|
||||||
|
effects.c
|
||||||
|
mixer.c
|
||||||
|
mix_all.c
|
||||||
|
load_helpers.c
|
||||||
|
load.c
|
||||||
|
hio.c
|
||||||
|
smix.c
|
||||||
|
memio.c
|
||||||
|
win32.c
|
||||||
|
|
||||||
|
loaders/common.c
|
||||||
|
loaders/itsex.c
|
||||||
|
loaders/sample.c
|
||||||
|
loaders/xm_load.c
|
||||||
|
loaders/mod_load.c
|
||||||
|
loaders/s3m_load.c
|
||||||
|
loaders/it_load.c
|
||||||
|
)
|
||||||
|
list(TRANSFORM xmp_sources PREPEND "${xmp-lite_SOURCE_DIR}/src/")
|
||||||
|
|
||||||
|
add_library(xmp-lite "${SRB2_INTERNAL_LIBRARY_TYPE}" ${xmp_sources})
|
||||||
|
|
||||||
|
target_compile_definitions(xmp-lite PRIVATE -D_REENTRANT -DLIBXMP_CORE_PLAYER -DLIBXMP_NO_PROWIZARD -DLIBXMP_NO_DEPACKERS)
|
||||||
|
if("${SRB2_INTERNAL_LIBRARY_TYPE}" STREQUAL "STATIC")
|
||||||
|
if(WIN32)
|
||||||
|
# BUILDING_STATIC has to be public to work around a bug in xmp.h
|
||||||
|
# which adds __declspec(dllimport) even when statically linking
|
||||||
|
target_compile_definitions(xmp-lite PUBLIC -DBUILDING_STATIC)
|
||||||
|
else()
|
||||||
|
target_compile_definitions(xmp-lite PRIVATE -DBUILDING_STATIC)
|
||||||
|
endif()
|
||||||
|
else()
|
||||||
|
target_compile_definitions(xmp-lite PRIVATE -DBUILDING_DLL)
|
||||||
|
endif()
|
||||||
|
target_include_directories(xmp-lite PRIVATE "${xmp-lite_SOURCE_DIR}/src")
|
||||||
|
target_include_directories(xmp-lite PUBLIC "${xmp-lite_SOURCE_DIR}/include/libxmp-lite")
|
||||||
|
|
||||||
|
add_library(xmp-lite::xmp-lite ALIAS xmp-lite)
|
||||||
|
endif()
|
||||||
|
|
||||||
add_subdirectory(tcbrindle_span)
|
add_subdirectory(tcbrindle_span)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue