[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [30083] trunk/blender: Fix #22219: compile error with videotexture/libavutil and recent gcc,

Brecht Van Lommel brecht at blender.org
Wed Jul 7 17:24:06 CEST 2010


Revision: 30083
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=30083
Author:   blendix
Date:     2010-07-07 17:24:06 +0200 (Wed, 07 Jul 2010)

Log Message:
-----------
Fix #22219: compile error with videotexture/libavutil and recent gcc,
need __STDC_CONSTANT_MACROS defined.

Modified Paths:
--------------
    trunk/blender/CMakeLists.txt
    trunk/blender/config/linux2-config.py

Modified: trunk/blender/CMakeLists.txt
===================================================================
--- trunk/blender/CMakeLists.txt	2010-07-07 15:09:35 UTC (rev 30082)
+++ trunk/blender/CMakeLists.txt	2010-07-07 15:24:06 UTC (rev 30083)
@@ -261,6 +261,7 @@
 		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 @@
 		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)

Modified: trunk/blender/config/linux2-config.py
===================================================================
--- trunk/blender/config/linux2-config.py	2010-07-07 15:09:35 UTC (rev 30082)
+++ trunk/blender/config/linux2-config.py	2010-07-07 15:24:06 UTC (rev 30083)
@@ -181,6 +181,9 @@
 
 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





More information about the Bf-blender-cvs mailing list