[ #4035 ] patch to make scons compile with ffmpeg in mingw
authorNathan Letwory <nathan@letworyinteractive.com>
Mon, 14 Aug 2006 12:47:13 +0000 (12:47 +0000)
committerNathan Letwory <nathan@letworyinteractive.com>
Mon, 14 Aug 2006 12:47:13 +0000 (12:47 +0000)
Submitted by Joseph Eagar (joeedh). windows/gcc ffmpeg library may need recompiling to support all codecs necessary (ie. H264 doesn't work).

config/win32-mingw-config.py
source/blender/blenkernel/SConscript
source/blender/imbuf/SConscript
source/blender/src/SConscript
tools/Blender.py
tools/btools.py

index 5d256300685ed56764d04b7aa6287598e98061d1..6a4aed6503f1477506e200ee791eaaf9ee82a688 100644 (file)
@@ -12,6 +12,12 @@ BF_OPENAL_INC = '${BF_OPENAL}/include'
 BF_OPENAL_LIB = 'openal_static'
 BF_OPENAL_LIBPATH = '${BF_OPENAL}/lib'
 
+WITH_BF_FFMPEG = 'false'
+BF_FFMPEG = LCGDIR + '/gcc/ffmpeg'
+BF_FFMPEG_LIB = 'avformat avutil avcodec'
+BF_FFMPEG_LIBPATH =  '${BF_FFMPEG}/lib'
+BF_FFMPEG_INC = '${BF_FFMPEG}/include'
+
 WITH_BF_SDL = 'true'
 BF_SDL = LCGDIR + '/sdl'
 BF_SDL_INC = '${BF_SDL}/include'
index aed4ad6ed4cc76eedeff8f3f85556027fc72b987..3221696d21aa212d9a7cb1517dac47dd63e8b6cb 100644 (file)
@@ -22,6 +22,7 @@ if env['WITH_BF_OPENEXR'] == 1:
 
 if env['WITH_BF_FFMPEG'] == 1:
     defs += ' WITH_FFMPEG'
+    incs += ' ' + env['BF_FFMPEG_INC']
 
 if env['WITH_BF_QUICKTIME'] == 1:
     defs += ' WITH_QUICKTIME'
index 93041ab97cff7898fc151b2829ca145d6aceb09a..0d9b9fbe81b024036dafce11a5ebea09487d47a5 100644 (file)
@@ -18,6 +18,7 @@ if env['WITH_BF_OPENEXR'] == 1:
 
 if env['WITH_BF_FFMPEG'] == 1:
     defs.append('WITH_FFMPEG')
+    incs += ' ' + env['BF_FFMPEG_INC']
 
 if env['WITH_BF_QUICKTIME']==1:
        incs += ' ' + env['BF_QUICKTIME_INC']
index fdd920e27133bda5ab6741e6efc229f3718dc87f..a70f9254d9867d7745e1721fb47168de7b6bf5bd 100644 (file)
@@ -34,6 +34,7 @@ if env['WITH_BF_QUICKTIME']==1:
 
 if env['WITH_BF_FFMPEG'] == 1:
     defs.append('WITH_FFMPEG')
+    incs += ' ' + env['BF_FFMPEG_INC']
 
 # TODO buildinfo
 if env['BF_BUILDINFO'] == 1:
index 8c334a705364f81ff5929added0e8c583f564132..c1e43d9ceeb76feac619c995cc44da4166ef4c93 100644 (file)
@@ -119,6 +119,7 @@ def setup_staticlibs(lenv):
         lenv['BF_ICONV_LIBPATH']
         ]
     libincs += Split(lenv['BF_OPENEXR_LIBPATH'])
+    libincs += Split(lenv['BF_FFMPEG_LIBPATH'])
 
     if lenv['WITH_BF_INTERNATIONAL']:
         libincs += Split(lenv['BF_GETTEXT_LIBPATH'])
index b66d388ec76cbf58bbf178d3393d28e797aebfc0..6f3c8537c688622c8f690590d0d91dd0b94fcf83 100755 (executable)
@@ -21,7 +21,7 @@ def validate_arguments(args, bc):
             'BF_PTHREADS', 'BF_PTHREADS_INC', 'BF_PTHREADS_LIB', 'BF_PTHREADS_LIBPATH',
             'WITH_BF_FMOD',
             'WITH_BF_OPENEXR', 'BF_OPENEXR', 'BF_OPENEXR_INC', 'BF_OPENEXR_LIB', 'BF_OPENEXR_LIBPATH',
-            'WITH_BF_FFMPEG', 'BF_FFMPEG_LIB', 
+            'WITH_BF_FFMPEG', 'BF_FFMPEG_LIB', 'BF_FFMPEG',  'BF_FFMPEG_INC',
             'WITH_BF_JPEG', 'BF_JPEG', 'BF_JPEG_INC', 'BF_JPEG_LIB', 'BF_JPEG_LIBPATH',
             'WITH_BF_PNG', 'BF_PNG', 'BF_PNG_INC', 'BF_PNG_LIB', 'BF_PNG_LIBPATH',
             'BF_TIFF', 'BF_TIFF_INC',
@@ -146,8 +146,11 @@ def read_opts(cfg, args):
         ('BF_OPENEXR_LIBPATH', 'OPENEXR library path', ''),
 
         (BoolOption('WITH_BF_FFMPEG', 'Use FFMPEG if true', 'false')),
+        ('BF_FFMPEG', 'FFMPEG base path', ''),
         ('BF_FFMPEG_LIB', 'FFMPEG library', ''),
-
+        ('BF_FFMPEG_INC', 'FFMPEG includes', ''),
+        ('BF_FFMPEG_LIBPATH', 'FFMPEG library path', ''),
+        
         (BoolOption('WITH_BF_JPEG', 'Use JPEG if true', 'true')),
         ('BF_JPEG', 'JPEG base path', ''),
         ('BF_JPEG_INC', 'JPEG include path', ''),