Skip to content
Snippets Groups Projects
Commit af0d38d6 authored by Nathan Letwory's avatar Nathan Letwory
Browse files

Patch [ #5254 ] FFMpeg for scons for MSVC

    from Guillaume Lecocq

I also added -D_CRT_SECURE_NO_DEPRECATE to shut the newer msvc version about deprecated functions (sprintf et al).
parent 19a4f411
No related branches found
No related tags found
No related merge requests found
...@@ -370,6 +370,21 @@ if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw'): ...@@ -370,6 +370,21 @@ if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw'):
dllsources += ['${LCGDIR}/pthreads/lib/pthreadVC2.dll'] dllsources += ['${LCGDIR}/pthreads/lib/pthreadVC2.dll']
if env['WITH_BF_ICONV']: if env['WITH_BF_ICONV']:
dllsources += ['${LCGDIR}/iconv/lib/iconv.dll'] dllsources += ['${LCGDIR}/iconv/lib/iconv.dll']
if env['WITH_BF_FFMPEG']:
dllsources += ['${LCGDIR}/ffmpeg/lib/avcodec-51.dll',
'${LCGDIR}/ffmpeg/lib/avformat-51.dll',
'${LCGDIR}/ffmpeg/lib/avutil-49.dll',
'${LCGDIR}/ffmpeg/lib/libdts.dll',
'${LCGDIR}/ffmpeg/lib/libfaac.dll',
'${LCGDIR}/ffmpeg/lib/libfaad.dll',
'${LCGDIR}/ffmpeg/lib/libgsm.dll',
'${LCGDIR}/ffmpeg/lib/libmp3lame-0.dll',
'${LCGDIR}/ffmpeg/lib/libogg-0.dll',
'${LCGDIR}/ffmpeg/lib/libvorbis-0.dll',
'${LCGDIR}/ffmpeg/lib/libvorbisenc-2.dll',
'${LCGDIR}/ffmpeg/lib/libx264-54.dll',
'${LCGDIR}/ffmpeg/lib/postproc-51.dll',
'${LCGDIR}/ffmpeg/lib/xvidcore.dll']
windlls = env.Install(dir=env['BF_INSTALLDIR'], source = dllsources) windlls = env.Install(dir=env['BF_INSTALLDIR'], source = dllsources)
allinstall += windlls allinstall += windlls
......
...@@ -4,6 +4,13 @@ LIBDIR = '${LCGDIR}' ...@@ -4,6 +4,13 @@ LIBDIR = '${LCGDIR}'
WITH_BF_VERSE = 'false' WITH_BF_VERSE = 'false'
BF_VERSE_INCLUDE = "#extern/verse/dist" BF_VERSE_INCLUDE = "#extern/verse/dist"
# enable ffmpeg support
WITH_BF_FFMPEG = 'false' # -DWITH_FFMPEG
BF_FFMPEG = LIBDIR +'/ffmpeg'
BF_FFMPEG_INC = '${BF_FFMPEG}/include'
BF_FFMPEG_LIBPATH='${BF_FFMPEG}/lib'
BF_FFMPEG_LIB = 'avformat-51.lib avcodec-51.lib avutil-49.lib postproc-51.lib'
BF_PYTHON = LIBDIR + '/python' BF_PYTHON = LIBDIR + '/python'
BF_PYTHON_VERSION = '2.4' BF_PYTHON_VERSION = '2.4'
BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}' BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}'
...@@ -140,7 +147,7 @@ CCFLAGS = ['/nologo', '/Og', '/Ot', '/Ob1', '/Op', '/G6','/EHsc', '/J', '/W3', ' ...@@ -140,7 +147,7 @@ CCFLAGS = ['/nologo', '/Og', '/Ot', '/Ob1', '/Op', '/G6','/EHsc', '/J', '/W3', '
BF_DEBUG_FLAGS = ['/Zi', '/FR${TARGET.base}.sbr'] BF_DEBUG_FLAGS = ['/Zi', '/FR${TARGET.base}.sbr']
CPPFLAGS = ['-DWIN32','-D_CONSOLE', '-D_LIB', '-DUSE_OPENAL', '-DFTGL_LIBRARY_STATIC'] CPPFLAGS = ['-DWIN32','-D_CONSOLE', '-D_LIB', '-DUSE_OPENAL', '-DFTGL_LIBRARY_STATIC', '-D_CRT_SECURE_NO_DEPRECATE']
REL_CFLAGS = ['-O2', '-DNDEBUG'] REL_CFLAGS = ['-O2', '-DNDEBUG']
REL_CCFLAGS = ['-O2', '-DNDEBUG'] REL_CCFLAGS = ['-O2', '-DNDEBUG']
C_WARN = [] C_WARN = []
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment