Fix #22219: compile error with videotexture/libavutil and recent gcc,
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Wed, 7 Jul 2010 15:24:06 +0000 (15:24 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Wed, 7 Jul 2010 15:24:06 +0000 (15:24 +0000)
need __STDC_CONSTANT_MACROS defined.

CMakeLists.txt
config/linux2-config.py

index 1088d95ab67c6cdf6cfd1fcacd6b3e98fffff62e..29af4db607307c7e481b129e3a10751cd2530d21 100644 (file)
@@ -261,6 +261,7 @@ IF(UNIX AND NOT APPLE)
                SET(FFMPEG_INC ${FFMPEG}/include)
                SET(FFMPEG_LIB avformat avcodec avutil avdevice swscale CACHE STRING "FFMPEG Libraries")
                SET(FFMPEG_LIBPATH ${FFMPEG}/lib)
+               SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D__STDC_CONSTANT_MACROS")
        ENDIF(WITH_FFMPEG)
 
        IF(WITH_FFTW3)
@@ -736,6 +737,7 @@ IF(APPLE)
                SET(FFMPEG_INC ${FFMPEG}/include)
                SET(FFMPEG_LIB avcodec avdevice avformat avutil mp3lame swscale x264 xvidcore theora theoradec theoraenc vorbis vorbisenc vorbisfile ogg)
                SET(FFMPEG_LIBPATH ${FFMPEG}/lib)
+               SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D__STDC_CONSTANT_MACROS")
        ENDIF(WITH_FFMPEG)
 
        SET(LIBSAMPLERATE ${LIBDIR}/samplerate)
index 213c20bd7d00583d52ffcfa9670c976fe891bccc..7a350a74ed5af2fa0445f9be788d8091d30c0009 100644 (file)
@@ -181,6 +181,9 @@ CCFLAGS = ['-pipe','-fPIC','-funsigned-char','-fno-strict-aliasing','-D_LARGEFIL
 
 CPPFLAGS = []
 CXXFLAGS = ['-pipe','-fPIC','-funsigned-char','-fno-strict-aliasing','-D_LARGEFILE_SOURCE', '-D_FILE_OFFSET_BITS=64']
+if WITH_BF_FFMPEG:
+  # libavutil needs UINT64_C()
+  CXXFLAGS += ['-D__STDC_CONSTANT_MACROS', ]
 REL_CFLAGS = ['-O2']
 REL_CCFLAGS = ['-O2']
 ##BF_DEPEND = True