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