I made multitude of fixes based on the comments provided online:
[blender.git] / build_files / scons / config / win64-vc-config.py
1 LCGDIR = '#../lib/win64'
2 LIBDIR = '${LCGDIR}'
3
4 # enable ffmpeg  support
5 WITH_BF_FFMPEG = True # -DWITH_FFMPEG
6 BF_FFMPEG = LIBDIR +'/ffmpeg'
7 BF_FFMPEG_INC = '${BF_FFMPEG}/include ${BF_FFMPEG}/include/msvc '
8 BF_FFMPEG_LIBPATH='${BF_FFMPEG}/lib'
9 BF_FFMPEG_LIB = 'avformat-53.lib avcodec-53.lib avdevice-53.lib avutil-51.lib swscale-2.lib'
10 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'
11
12 BF_PYTHON = LIBDIR + '/python'
13 BF_PYTHON_VERSION = '3.2'
14 BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}'
15 BF_PYTHON_BINARY = 'python'
16 BF_PYTHON_LIB = 'python32'
17 BF_PYTHON_DLL = '${BF_PYTHON_LIB}'
18 BF_PYTHON_LIBPATH = '${BF_PYTHON}/lib'
19
20 WITH_BF_OPENAL = False 
21 BF_OPENAL = LIBDIR + '/openal'
22 BF_OPENAL_INC = '${BF_OPENAL}/include '
23 BF_OPENAL_LIB = 'wrap_oal'
24 BF_OPENAL_LIBPATH = '${BF_OPENAL}/lib'
25
26 WITH_BF_SNDFILE = True
27 BF_SNDFILE = LIBDIR + '/sndfile'
28 BF_SNDFILE_INC = '${BF_SNDFILE}/include'
29 BF_SNDFILE_LIB = 'libsndfile-1'
30 BF_SNDFILE_LIBPATH = '${BF_SNDFILE}/lib'
31
32 # TODO - are these useful on win32?
33 # BF_CXX = '/usr'
34 # WITH_BF_STATICCXX = False
35 # BF_CXX_LIB_STATIC = '${BF_CXX}/lib/libstdc++.a'
36
37 WITH_BF_ICONV = True
38 BF_ICONV = LIBDIR + '/iconv'
39 BF_ICONV_INC = '${BF_ICONV}/include'
40 BF_ICONV_LIB = 'iconv'
41 BF_ICONV_LIBPATH = '${BF_ICONV}/lib'
42
43 BF_LIBSAMPLERATE = LIBDIR + '/samplerate'
44 BF_LIBSAMPLERATE_INC = '${BF_LIBSAMPLERATE}/include'
45 BF_LIBSAMPLERATE_LIB = 'libsamplerate'
46 BF_LIBSAMPLERATE_LIBPATH = '${BF_LIBSAMPLERATE}/lib'
47
48 WITH_BF_SDL = True
49 BF_SDL = LIBDIR + '/sdl'
50 BF_SDL_INC = '${BF_SDL}/include'
51 BF_SDL_LIB = 'SDL.lib'
52 BF_SDL_LIBPATH = '${BF_SDL}/lib'
53
54 WITH_BF_JACK = False
55
56 BF_PTHREADS = LIBDIR + '/pthreads'
57 BF_PTHREADS_INC = '${BF_PTHREADS}/include'
58 BF_PTHREADS_LIB = 'pthreadVC2'
59 BF_PTHREADS_LIBPATH = '${BF_PTHREADS}/lib'
60
61 WITH_BF_FMOD = False
62 BF_FMOD = LIBDIR + '/fmod'
63
64 WITH_BF_OPENEXR = True
65 WITH_BF_STATICOPENEXR = False
66 BF_OPENEXR = LIBDIR + '/openexr'
67 BF_OPENEXR_INC = '${BF_OPENEXR}/include ${BF_OPENEXR}/include/IlmImf ${BF_OPENEXR}/include/Iex ${BF_OPENEXR}/include/Imath '
68 BF_OPENEXR_LIB = ' Iex Half IlmImf Imath IlmThread '
69 BF_OPENEXR_LIBPATH = '${BF_OPENEXR}/lib_vs2008'
70 # Warning, this static lib configuration is untested! users of this OS please confirm.
71 BF_OPENEXR_LIB_STATIC = '${BF_OPENEXR}/lib/libHalf.a ${BF_OPENEXR}/lib/libIlmImf.a ${BF_OPENEXR}/lib/libIex.a ${BF_OPENEXR}/lib/libImath.a ${BF_OPENEXR}/lib/libIlmThread.a'
72
73 WITH_BF_DDS = True
74
75 WITH_BF_JPEG = True
76 BF_JPEG = LIBDIR + '/jpeg'
77 BF_JPEG_INC = '${BF_JPEG}/include'
78 BF_JPEG_LIB = 'libjpeg'
79 BF_JPEG_LIBPATH = '${BF_JPEG}/lib'
80
81 WITH_BF_PNG = True
82 BF_PNG = LIBDIR + '/png'
83 BF_PNG_INC = '${BF_PNG}/include'
84 BF_PNG_LIB = 'libpng'
85 BF_PNG_LIBPATH = '${BF_PNG}/lib'
86
87 WITH_BF_TIFF = True
88 BF_TIFF = LIBDIR + '/tiff'
89 BF_TIFF_INC = '${BF_TIFF}/include'
90 BF_TIFF_LIB = 'libtiff'
91 BF_TIFF_LIBPATH = '${BF_TIFF}/lib'
92
93 WITH_BF_ZLIB = True
94 BF_ZLIB = LIBDIR + '/zlib'
95 BF_ZLIB_INC = '${BF_ZLIB}/include'
96 BF_ZLIB_LIB = 'libz'
97 BF_ZLIB_LIBPATH = '${BF_ZLIB}/lib'
98
99 WITH_BF_INTERNATIONAL = False
100
101 BF_GETTEXT = LIBDIR + '/gettext'
102 BF_GETTEXT_INC = '${BF_GETTEXT}/include'
103 BF_GETTEXT_LIB = 'gettext'
104 BF_GETTEXT_LIBPATH = '${BF_GETTEXT}/lib'
105
106 WITH_BF_GAMEENGINE = True
107 WITH_BF_PLAYER = True
108
109 WITH_BF_BULLET = True
110 BF_BULLET = '#extern/bullet2/src'
111 BF_BULLET_INC = '${BF_BULLET}'
112 BF_BULLET_LIB = 'extern_bullet'
113
114 BF_WINTAB = LIBDIR + '/wintab'
115 BF_WINTAB_INC = '${BF_WINTAB}/INCLUDE'
116
117 WITH_BF_BINRELOC = False
118
119 # enable freetype2 support for text objects
120 BF_WITH_FREETYPE = True
121 BF_FREETYPE = LIBDIR + '/freetype'
122 BF_FREETYPE_INC = '${BF_FREETYPE}/include ${BF_FREETYPE}/include/freetype2'
123 BF_FREETYPE_LIB = 'freetype2ST'
124 BF_FREETYPE_LIBPATH = '${BF_FREETYPE}/lib'
125
126 WITH_BF_QUICKTIME = False # -DWITH_QUICKTIME
127 BF_QUICKTIME = LIBDIR + '/QTDevWin'
128 BF_QUICKTIME_INC = '${BF_QUICKTIME}/CIncludes'
129 BF_QUICKTIME_LIB = 'qtmlClient'
130 BF_QUICKTIME_LIBPATH = '${BF_QUICKTIME}/Libraries'
131
132 WITH_BF_OPENJPEG = False
133 BF_OPENJPEG = '#extern/libopenjpeg'
134 BF_OPENJPEG_LIB = ''
135 BF_OPENJPEG_INC = '${BF_OPENJPEG}'
136 BF_OPENJPEG_LIBPATH='${BF_OPENJPEG}/lib'
137
138 WITH_BF_FFTW3 = True
139 BF_FFTW3 = LIBDIR + '/fftw3'
140 BF_FFTW3_INC = '${BF_FFTW3}/include'
141 BF_FFTW3_LIB = 'libfftw'
142 BF_FFTW3_LIBPATH = '${BF_FFTW3}/lib'
143
144 WITH_BF_REDCODE = False  
145 BF_REDCODE_INC = '#extern'
146
147 WITH_BF_COLLADA = True
148 BF_COLLADA = '#source/blender/collada'
149 BF_COLLADA_INC = '${BF_COLLADA}'
150 BF_COLLADA_LIB = 'bf_collada'
151
152 BF_OPENCOLLADA = LIBDIR + '/opencollada'
153 BF_OPENCOLLADA_INC = '${BF_OPENCOLLADA}/include'
154 BF_OPENCOLLADA_LIB = 'OpenCOLLADAStreamWriter OpenCOLLADASaxFrameworkLoader OpenCOLLADAFramework OpenCOLLADABaseUtils GeneratedSaxParser MathMLSolver xml2 pcre buffer ftoa UTF'
155 BF_OPENCOLLADA_LIBPATH = '${BF_OPENCOLLADA}/lib'
156
157 WITH_BF_3DMOUSE = True
158
159 #Ray trace optimization
160 WITH_BF_RAYOPTIMIZATION = True
161 BF_RAYOPTIMIZATION_SSE_FLAGS = ['/arch:SSE','/arch:SSE2']
162
163 WITH_BF_STATICOPENGL = False
164 BF_OPENGL_INC = '${BF_OPENGL}/include'
165 BF_OPENGL_LIBINC = '${BF_OPENGL}/lib'
166 BF_OPENGL_LIB = 'opengl32 glu32'
167 BF_OPENGL_LIB_STATIC = [ '${BF_OPENGL}/lib/libGL.a', '${BF_OPENGL}/lib/libGLU.a',
168                          '${BF_OPENGL}/lib/libXmu.a', '${BF_OPENGL}/lib/libXext.a',
169                          '${BF_OPENGL}/lib/libX11.a', '${BF_OPENGL}/lib/libXi.a' ]
170 CC = 'cl.exe'
171 CXX = 'cl.exe'
172
173 CFLAGS = []
174 CCFLAGS = ['/nologo', '/Ob1', '/J', '/W0', '/Gd', '/we4013', '/wd4018', '/wd4244', '/wd4305', '/wd4800', '/wd4065', '/wd4267']
175 CXXFLAGS = ['/EHsc']
176 BGE_CXXFLAGS = ['/O2', '/EHsc', '/GR', '/fp:fast']
177
178 BF_DEBUG_CCFLAGS = ['/Zi', '/FR${TARGET}.sbr', '/Od']
179
180 CPPFLAGS = ['-DWIN32', '-D_CONSOLE', '-D_LIB', '-D_CRT_SECURE_NO_DEPRECATE']
181 REL_CFLAGS = ['-O2', '-DNDEBUG']
182 REL_CCFLAGS = ['-O2', '-DNDEBUG']
183 REL_CXXFLAGS = ['-O2', '-DNDEBUG']
184
185 C_WARN = []
186 CC_WARN = []
187 CXX_WARN = []
188
189 LLIBS = ['ws2_32', 'vfw32', 'winmm', 'kernel32', 'user32', 'gdi32', 'comdlg32', 'advapi32', 'shfolder', 'shell32', 'ole32', 'oleaut32', 'uuid']
190
191 if BF_DEBUG:
192         BF_NUMJOBS=1
193 else:
194         BF_NUMJOBS=6
195
196 PLATFORM_LINKFLAGS = ['/SUBSYSTEM:CONSOLE','/MACHINE:X64','/STACK:2097152','/OPT:NOREF','/INCREMENTAL:NO', '/NODEFAULTLIB:msvcrt.lib', '/NODEFAULTLIB:msvcmrt.lib', '/NODEFAULTLIB:msvcurt.lib', '/NODEFAULTLIB:msvcrtd.lib']
197
198 BF_BUILDDIR = '..\\build\\blender25-win64-vc'
199 BF_INSTALLDIR='..\\install\\blender25-win64-vc'
200