Enable FFmpeg / BinkDec optionality for macOS

This commit is contained in:
Stephen Saunders 2021-07-27 17:24:01 -04:00
parent c4030850ab
commit cbb9610a1b
5 changed files with 11 additions and 5 deletions

View file

@ -502,8 +502,7 @@ Recommended in this case is `cmake-vs2017-64bit-windows10.bat`
> sudo zypper install cmake libSDL2-devel openal-soft-devel
You don't need FFmpeg to be installed. You can turn it off by adding -DFFMPEG=OFF to the CMake options.
It is enabled by default because the bundled libbinkdec is slow during development if compiled for Debug mode.
You don't need FFmpeg to be installed. You can turn it off by adding -DFFMPEG=OFF and -DBINKDEC=ON to the CMake options. It is enabled by default because the bundled libbinkdec is slow during development if compiled for Debug mode.
2. Generate the Makefiles using CMake:
@ -523,6 +522,8 @@ Recommended in this case is `cmake-vs2017-64bit-windows10.bat`
2. You need the following dependencies in order to compile RBDoom3BFG with all features:
> brew install cmake sdl2 openal-soft ffmpeg
You don't need FFmpeg to be installed. You can turn it off by adding -DFFMPEG=OFF and -DBINKDEC=ON to the CMake options. It is enabled by default because the bundled libbinkdec is slow during development if compiled for Debug mode.
3. Generate the Makefiles using CMake:

View file

@ -56,8 +56,13 @@
#else // DG: add alternative that should work with at least GCC and clang
#define DECLARE_ALIGNED(n,t,v) t __attribute__ ((aligned (n))) v
#endif
// SRS - Add guards to prevent override of standard math defines
#ifndef M_PI
#define M_PI 3.14159265358979323846 /* pi */
#endif
#ifndef M_SQRT1_2
#define M_SQRT1_2 0.70710678118654752440 /* 1/sqrt(2) */
#endif
#define HAVE_MMX 0
#define ARCH_ARM 0

View file

@ -452,7 +452,7 @@ int BinkDecoder::ReadDCs(BinkCommon::BitReader &bits, Bundle *b, int start_bits,
v += v2;
*dst++ = v;
if (v < -32768 || v > 32767) {
BinkCommon::LogError("DC value went out of bounds" + v);
BinkCommon::LogError("DC value went out of bounds: " + std::to_string(v));
return -1;
}
}

View file

@ -26,7 +26,7 @@ If you have questions concerning this license or the applicable additional terms
===========================================================================
*/
//#include "../../idlib/precompiled.h"
#include "../../idlib/precompiled.h"
#include "../posix/posix_public.h"
//#include "../sys_local.h"

View file

@ -50,7 +50,7 @@ If you have questions concerning this license or the applicable additional terms
#endif
#if defined(__APPLE__)
#include <SDL2/SDL.h>
#include <SDL.h>
#endif
#include <sys/statvfs.h>