make umx codec vital, make other codecs non-vital
parent
40264fdea9
commit
408f1ea5fe
|
@ -9,18 +9,19 @@ if(NOT MSVC)
|
|||
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wall -Wextra -Werror")
|
||||
endif()
|
||||
|
||||
find_package(OpenGL REQUIRED)
|
||||
find_package(OpenGL REQUIRED)
|
||||
find_package(PkgConfig REQUIRED)
|
||||
|
||||
pkg_check_modules(SDL2 REQUIRED IMPORTED_TARGET sdl2>=2.0.0)
|
||||
pkg_check_modules(FLAC REQUIRED IMPORTED_TARGET flac>=1.3.3)
|
||||
pkg_check_modules(Vorbis REQUIRED IMPORTED_TARGET vorbis>=1.3.6
|
||||
vorbisfile>=1.3.6
|
||||
ogg>=1.3.4)
|
||||
pkg_check_modules(Opus REQUIRED IMPORTED_TARGET opus>=1.3.1
|
||||
opusfile>=0.11
|
||||
ogg>=1.3.4)
|
||||
pkg_check_modules(MikMod REQUIRED IMPORTED_TARGET libmikmod>=3.3.11)
|
||||
pkg_check_modules(SDL2 REQUIRED IMPORTED_TARGET sdl2>=2.0.0)
|
||||
|
||||
pkg_check_modules(FLAC IMPORTED_TARGET flac>=1.3.3)
|
||||
pkg_check_modules(Vorbis IMPORTED_TARGET vorbis>=1.3.6
|
||||
vorbisfile>=1.3.6
|
||||
ogg>=1.3.4)
|
||||
pkg_check_modules(Opus IMPORTED_TARGET opus>=1.3.1
|
||||
opusfile>=0.11
|
||||
ogg>=1.3.4)
|
||||
pkg_check_modules(MikMod IMPORTED_TARGET libmikmod>=3.3.11)
|
||||
|
||||
add_executable(quake WIN32
|
||||
source/anorm_dots.h
|
||||
|
@ -166,20 +167,14 @@ add_executable(quake WIN32
|
|||
source/zone.c
|
||||
source/zone.h)
|
||||
|
||||
target_compile_definitions(
|
||||
quake
|
||||
PUBLIC
|
||||
-DUSE_CODEC_FLAC=1
|
||||
-DUSE_CODEC_VORBIS=1
|
||||
-DUSE_CODEC_OPUS=1
|
||||
-DUSE_CODEC_MIKMOD=1
|
||||
-DUSE_CODEC_UMX=1)
|
||||
function(agw_checked_library define library)
|
||||
target_compile_definitions(quake PUBLIC -D${define}=1)
|
||||
target_link_libraries(quake ${library})
|
||||
endfunction()
|
||||
|
||||
target_link_libraries(quake
|
||||
m
|
||||
OpenGL::GL
|
||||
PkgConfig::SDL2
|
||||
PkgConfig::FLAC
|
||||
PkgConfig::Vorbis
|
||||
PkgConfig::Opus
|
||||
PkgConfig::MikMod)
|
||||
agw_checked_library(USE_CODEC_FLAC PkgConfig::FLAC)
|
||||
agw_checked_library(USE_CODEC_VORBIS PkgConfig::Vorbis)
|
||||
agw_checked_library(USE_CODEC_OPUS PkgConfig::Opus)
|
||||
agw_checked_library(USE_CODEC_MikMod PkgConfig::MikMod)
|
||||
|
||||
target_link_libraries(quake m OpenGL::GL PkgConfig::SDL2)
|
||||
|
|
|
@ -63,9 +63,7 @@ void S_CodecInit (void)
|
|||
|
||||
/* Register in the inverse order
|
||||
* of codec choice preference: */
|
||||
#ifdef USE_CODEC_UMX
|
||||
S_CodecRegister(&umx_codec);
|
||||
#endif
|
||||
#ifdef USE_CODEC_MIKMOD
|
||||
S_CodecRegister(&mikmod_codec);
|
||||
#endif
|
||||
|
|
|
@ -29,7 +29,6 @@
|
|||
|
||||
#include "quakedef.h"
|
||||
|
||||
#if defined(USE_CODEC_UMX)
|
||||
#include "snd_codec.h"
|
||||
#include "snd_codeci.h"
|
||||
#include "snd_umx.h"
|
||||
|
@ -403,5 +402,3 @@ snd_codec_t umx_codec =
|
|||
NULL
|
||||
};
|
||||
|
||||
#endif /* USE_CODEC_UMX */
|
||||
|
||||
|
|
|
@ -2,11 +2,7 @@
|
|||
#if !defined(_SND_UMX_H_)
|
||||
#define _SND_UMX_H_
|
||||
|
||||
#if defined(USE_CODEC_UMX)
|
||||
|
||||
extern snd_codec_t umx_codec;
|
||||
|
||||
#endif /* USE_CODEC_UMX */
|
||||
|
||||
#endif /* ! _SND_UMX_H_ */
|
||||
|
||||
|
|
Loading…
Reference in New Issue