diff options
author | Jürgen Herrmann <shadowrom@me.com> | 2013-06-18 15:55:32 +0400 |
---|---|---|
committer | Jürgen Herrmann <shadowrom@me.com> | 2013-06-18 15:55:32 +0400 |
commit | 836b91c9c711b0ce3803f64b3123cdd4d1adc47d (patch) | |
tree | 2553eef69e1e5369b65ad0dd4a74529c91a06fb0 /build_files/scons | |
parent | c88ea1c4f895feee6163a0bf5d8541421d1c74e6 (diff) |
Scons and BuildBot changes for MSVC 2012 support.
Thanks Brecht and Thomas for reviewing ;)
Diffstat (limited to 'build_files/scons')
-rw-r--r-- | build_files/scons/config/win64-vc-config.py | 59 | ||||
-rw-r--r-- | build_files/scons/tools/btools.py | 5 |
2 files changed, 48 insertions, 16 deletions
diff --git a/build_files/scons/config/win64-vc-config.py b/build_files/scons/config/win64-vc-config.py index eb3533cdb8b..c7bf2fa0bd2 100644 --- a/build_files/scons/config/win64-vc-config.py +++ b/build_files/scons/config/win64-vc-config.py @@ -1,12 +1,29 @@ -LCGDIR = '#../lib/win64' +import subprocess + +CL_OUT = subprocess.Popen(["cl.exe"],stdout=subprocess.PIPE,stderr=subprocess.PIPE) +CL_STDOUT, CL_STDERR = CL_OUT.communicate() + +if CL_STDERR.find("Version 15.00.") == -1: + VC_VERSION = '11.0' + LCGDIR = '#../lib/win64_vc11' + +else: + VC_VERSION = '9.0' + LCGDIR = '#../lib/win64' + LIBDIR = '${LCGDIR}' WITH_BF_FFMPEG = True BF_FFMPEG = LIBDIR +'/ffmpeg' BF_FFMPEG_INC = '${BF_FFMPEG}/include ${BF_FFMPEG}/include/msvc ' BF_FFMPEG_LIBPATH='${BF_FFMPEG}/lib' -BF_FFMPEG_LIB = 'avformat-53.lib avcodec-53.lib avdevice-53.lib avutil-51.lib swscale-2.lib' -BF_FFMPEG_DLL = '${BF_FFMPEG_LIBPATH}/avformat-53.dll ${BF_FFMPEG_LIBPATH}/avcodec-53.dll ${BF_FFMPEG_LIBPATH}/avdevice-53.dll ${BF_FFMPEG_LIBPATH}/avutil-51.dll ${BF_FFMPEG_LIBPATH}/swscale-2.dll' +if VC_VERSION == '11.0': + BF_FFMPEG_LIB = 'avformat-54.lib avcodec-54.lib avdevice-54.lib avutil-52.lib avfilter-3.lib swscale-2.lib swresample-0.lib' + BF_FFMPEG_DLL = '${BF_FFMPEG_LIBPATH}/avformat-54.dll ${BF_FFMPEG_LIBPATH}/avcodec-54.dll ${BF_FFMPEG_LIBPATH}/avdevice-54.dll ${BF_FFMPEG_LIBPATH}/avutil-52.dll ${BF_FFMPEG_LIBPATH}/avfilter-3.dll ${BF_FFMPEG_LIBPATH}/swscale-2.dll ${BF_FFMPEG_LIBPATH}/swresample-0.dll' +else: + BF_FFMPEG_LIB = 'avformat-53.lib avcodec-53.lib avdevice-53.lib avutil-51.lib swscale-2.lib' + BF_FFMPEG_DLL = '${BF_FFMPEG_LIBPATH}/avformat-53.dll ${BF_FFMPEG_LIBPATH}/avcodec-53.dll ${BF_FFMPEG_LIBPATH}/avdevice-53.dll ${BF_FFMPEG_LIBPATH}/avutil-51.dll ${BF_FFMPEG_LIBPATH}/swscale-2.dll' + BF_PYTHON = LIBDIR + '/python' BF_PYTHON_VERSION = '3.3' @@ -19,7 +36,10 @@ BF_PYTHON_LIBPATH = '${BF_PYTHON}/lib' WITH_BF_OPENAL = True BF_OPENAL = LIBDIR + '/openal' BF_OPENAL_INC = '${BF_OPENAL}/include ' -BF_OPENAL_LIB = 'wrap_oal' +if VC_VERSION == '11.0': + BF_OPENAL_LIB = 'OpenAL32' +else: + BF_OPENAL_LIB = 'wrap_oal' BF_OPENAL_LIBPATH = '${BF_OPENAL}/lib' WITH_BF_SNDFILE = True @@ -37,7 +57,10 @@ BF_ICONV_LIBPATH = '${BF_ICONV}/lib' WITH_BF_SDL = True BF_SDL = LIBDIR + '/sdl' BF_SDL_INC = '${BF_SDL}/include' -BF_SDL_LIB = 'SDL.lib' +if VC_VERSION == '11.0': + BF_SDL_LIB = 'SDL.lib dxguid.lib' +else: + BF_SDL_LIB = 'SDL.lib' BF_SDL_LIBPATH = '${BF_SDL}/lib' WITH_BF_JACK = False @@ -178,8 +201,12 @@ WITH_BF_STATICOCIO = True WITH_BF_BOOST = True BF_BOOST = '${LIBDIR}/boost' BF_BOOST_INC = '${BF_BOOST}/include' -BF_BOOST_LIB = 'libboost_date_time-vc90-mt-s-1_49 libboost_filesystem-vc90-mt-s-1_49 libboost_regex-vc90-mt-s-1_49 libboost_system-vc90-mt-s-1_49 libboost_thread-vc90-mt-s-1_49 libboost_wave-vc90-mt-s-1_49' -BF_BOOST_LIB_INTERNATIONAL = ' libboost_locale-vc90-mt-s-1_49' +if VC_VERSION == '11.0': + BF_BOOST_LIB = 'libboost_date_time-vc110-mt-s-1_53 libboost_filesystem-vc110-mt-s-1_53 libboost_regex-vc110-mt-s-1_53 libboost_system-vc110-mt-s-1_53 libboost_thread-vc110-mt-s-1_53 libboost_wave-vc110-mt-s-1_53' + BF_BOOST_LIB_INTERNATIONAL = ' libboost_locale-vc110-mt-s-1_53' +else: + BF_BOOST_LIB = 'libboost_date_time-vc90-mt-s-1_49 libboost_filesystem-vc90-mt-s-1_49 libboost_regex-vc90-mt-s-1_49 libboost_system-vc90-mt-s-1_49 libboost_thread-vc90-mt-s-1_49 libboost_wave-vc90-mt-s-1_49' + BF_BOOST_LIB_INTERNATIONAL = ' libboost_locale-vc90-mt-s-1_49' BF_BOOST_LIBPATH = '${BF_BOOST}/lib' #CUDA @@ -206,16 +233,16 @@ CC = 'cl.exe' CXX = 'cl.exe' CFLAGS = [] -CCFLAGS = ['/nologo', '/Ob1', '/J', '/W1', '/Gd', '/we4013', '/wd4018', '/wd4244', '/wd4305', '/wd4800', '/wd4065', '/wd4267'] +CCFLAGS = ['/nologo', '/J', '/W1', '/Gd', '/we4013', '/wd4018', '/wd4244', '/wd4305', '/wd4800', '/wd4065', '/wd4267'] CXXFLAGS = ['/EHsc'] -BGE_CXXFLAGS = ['/O2', '/EHsc', '/GR', '/fp:fast'] +BGE_CXXFLAGS = ['/O2', '/Ob2', '/EHsc', '/GR', '/fp:fast'] -BF_DEBUG_CCFLAGS = ['/Zi', '/FR${TARGET}.sbr', '/Od'] +BF_DEBUG_CCFLAGS = ['/Zi', '/FR${TARGET}.sbr', '/Od', '/Ob0'] CPPFLAGS = ['-DWIN32', '-D_CONSOLE', '-D_LIB', '-D_CRT_SECURE_NO_DEPRECATE', '-DOPJ_STATIC'] REL_CFLAGS = [] REL_CXXFLAGS = [] -REL_CCFLAGS = ['-O2', '-DNDEBUG'] +REL_CCFLAGS = ['-O2', '/Ob2', '-DNDEBUG'] C_WARN = [] CC_WARN = [] @@ -224,7 +251,9 @@ CXX_WARN = [] LLIBS = ['ws2_32', 'vfw32', 'winmm', 'kernel32', 'user32', 'gdi32', 'comdlg32', 'advapi32', 'shfolder', 'shell32', 'ole32', 'oleaut32', 'uuid', 'psapi'] PLATFORM_LINKFLAGS = ['/SUBSYSTEM:CONSOLE','/MACHINE:X64','/STACK:2097152','/OPT:NOREF','/INCREMENTAL:NO', '/NODEFAULTLIB:msvcrt.lib', '/NODEFAULTLIB:msvcmrt.lib', '/NODEFAULTLIB:msvcurt.lib', '/NODEFAULTLIB:msvcrtd.lib'] - -BF_BUILDDIR = '..\\build\\win64-vc' -BF_INSTALLDIR='..\\install\\win64-vc' - +if VC_VERSION == '11.0': + BF_BUILDDIR = '..\\build\\win64-vc11' + BF_INSTALLDIR='..\\install\\win64-vc11' +else: + BF_BUILDDIR = '..\\build\\win64-vc' + BF_INSTALLDIR='..\\install\\win64-vc' diff --git a/build_files/scons/tools/btools.py b/build_files/scons/tools/btools.py index 868d443f8bb..90674113f47 100644 --- a/build_files/scons/tools/btools.py +++ b/build_files/scons/tools/btools.py @@ -190,7 +190,7 @@ def validate_arguments(args, bc): 'BF_BSC', 'BF_CONFIG', 'BF_PRIORITYLIST', 'BF_BUILDINFO','CC', 'CXX', 'BF_QUICKDEBUG', 'BF_LISTDEBUG', 'LCGDIR', 'BF_X264_CONFIG', 'BF_XVIDCORE_CONFIG', - 'BF_UNIT_TEST', 'BF_BITNESS'] + 'BF_UNIT_TEST', 'BF_BITNESS', 'MSVS_VERSION'] okdict = {} @@ -687,6 +687,9 @@ def buildslave(target=None, source=None, env=None): if platform == 'darwin': platform = 'OSX-' + env['MACOSX_DEPLOYMENT_TARGET'] + '-' + env['MACOSX_ARCHITECTURE'] + if env['MSVC_VERSION'] == '11.0': + platform = env['OURPLATFORM'] + '11' + branch = env['BUILDBOT_BRANCH'] outdir = os.path.abspath(env['BF_INSTALLDIR']) |