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