From cd2e6d44367e84d94373bfec68fcb24992d5ea50 Mon Sep 17 00:00:00 2001 From: scrawl Date: Sun, 28 Jun 2015 05:53:03 +0200 Subject: [PATCH] Move the __STDC_CONSTANT_MACROS define to cmakelists --- CMakeLists.txt | 2 ++ apps/openmw/mwsound/ffmpeg_decoder.hpp | 6 ------ apps/openmw/mwsound/libavwrapper.cpp | 3 --- extern/osg-ffmpeg-videoplayer/audiodecoder.hpp | 3 --- extern/osg-ffmpeg-videoplayer/libavwrapper.cpp | 3 --- extern/osg-ffmpeg-videoplayer/videoplayer.hpp | 6 ------ extern/osg-ffmpeg-videoplayer/videostate.hpp | 3 --- 7 files changed, 2 insertions(+), 24 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7bcdf35e2a..a133a8d6a4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -120,6 +120,8 @@ else() message(FATAL_ERROR "Install either libswresample (FFmpeg) or libavresample (Libav).") endif() endif() +# Required for building the FFmpeg headers +add_definitions(-D__STDC_CONSTANT_MACROS) set(SOUND_INPUT_LIBRARY ${FFMPEG_LIBRARIES}) diff --git a/apps/openmw/mwsound/ffmpeg_decoder.hpp b/apps/openmw/mwsound/ffmpeg_decoder.hpp index 3abf7c474d..da8e58964b 100644 --- a/apps/openmw/mwsound/ffmpeg_decoder.hpp +++ b/apps/openmw/mwsound/ffmpeg_decoder.hpp @@ -1,12 +1,6 @@ #ifndef GAME_SOUND_FFMPEG_DECODER_H #define GAME_SOUND_FFMPEG_DECODER_H -// FIXME: This can't be right? The headers refuse to build without UINT64_C, -// which only gets defined in stdint.h in either C99 mode or with this macro -// defined... -#ifndef __STDC_CONSTANT_MACROS -#define __STDC_CONSTANT_MACROS -#endif #include extern "C" { diff --git a/apps/openmw/mwsound/libavwrapper.cpp b/apps/openmw/mwsound/libavwrapper.cpp index a7a3245da3..40be671760 100644 --- a/apps/openmw/mwsound/libavwrapper.cpp +++ b/apps/openmw/mwsound/libavwrapper.cpp @@ -1,9 +1,6 @@ #ifndef HAVE_LIBSWRESAMPLE extern "C" { -#ifndef __STDC_CONSTANT_MACROS -#define __STDC_CONSTANT_MACROS -#endif #include #include diff --git a/extern/osg-ffmpeg-videoplayer/audiodecoder.hpp b/extern/osg-ffmpeg-videoplayer/audiodecoder.hpp index fe36ec39f1..a592b02d37 100644 --- a/extern/osg-ffmpeg-videoplayer/audiodecoder.hpp +++ b/extern/osg-ffmpeg-videoplayer/audiodecoder.hpp @@ -1,9 +1,6 @@ #ifndef VIDEOPLAYER_AUDIODECODER_H #define VIDEOPLAYER_AUDIODECODER_H -#ifndef __STDC_CONSTANT_MACROS -#define __STDC_CONSTANT_MACROS -#endif #include #include diff --git a/extern/osg-ffmpeg-videoplayer/libavwrapper.cpp b/extern/osg-ffmpeg-videoplayer/libavwrapper.cpp index 6edc362077..26a7b63706 100644 --- a/extern/osg-ffmpeg-videoplayer/libavwrapper.cpp +++ b/extern/osg-ffmpeg-videoplayer/libavwrapper.cpp @@ -3,9 +3,6 @@ #ifndef HAVE_LIBSWRESAMPLE extern "C" { -#ifndef __STDC_CONSTANT_MACROS -#define __STDC_CONSTANT_MACROS -#endif #include #include diff --git a/extern/osg-ffmpeg-videoplayer/videoplayer.hpp b/extern/osg-ffmpeg-videoplayer/videoplayer.hpp index 79f9edb1c6..c118ddb7f5 100644 --- a/extern/osg-ffmpeg-videoplayer/videoplayer.hpp +++ b/extern/osg-ffmpeg-videoplayer/videoplayer.hpp @@ -1,12 +1,6 @@ #ifndef VIDEOPLAYER_H #define VIDEOPLAYER_H -// FIXME: This can't be right? The ffmpeg headers refuse to build without UINT64_C, -// which only gets defined in stdint.h in either C99 mode or with this macro -// defined... -#ifndef __STDC_CONSTANT_MACROS -#define __STDC_CONSTANT_MACROS -#endif #include #include diff --git a/extern/osg-ffmpeg-videoplayer/videostate.hpp b/extern/osg-ffmpeg-videoplayer/videostate.hpp index 247e04ec47..72a2aab186 100644 --- a/extern/osg-ffmpeg-videoplayer/videostate.hpp +++ b/extern/osg-ffmpeg-videoplayer/videostate.hpp @@ -1,9 +1,6 @@ #ifndef VIDEOPLAYER_VIDEOSTATE_H #define VIDEOPLAYER_VIDEOSTATE_H -#ifndef __STDC_CONSTANT_MACROS -#define __STDC_CONSTANT_MACROS -#endif #include #include