a0dade8bdf67a84ad7c470a9bcc213f668c5a0f4
[blender-staging.git] / build_files / scons / config / win32-vc-config.py
1 LCGDIR = '#../lib/windows'
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 = True
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_ICONV = True
26 BF_ICONV = LIBDIR + '/iconv'
27 BF_ICONV_INC = '${BF_ICONV}/include'
28 BF_ICONV_LIB = 'iconv'
29 BF_ICONV_LIBPATH = '${BF_ICONV}/lib'
30
31 BF_LIBSAMPLERATE = LIBDIR + '/samplerate'
32 BF_LIBSAMPLERATE_INC = '${BF_LIBSAMPLERATE}/include'
33 BF_LIBSAMPLERATE_LIB = 'libsamplerate'
34 BF_LIBSAMPLERATE_LIBPATH = '${BF_LIBSAMPLERATE}/lib'
35
36 WITH_BF_JACK = False
37 BF_JACK = LIBDIR + '/jack'
38 BF_JACK_INC = '${BF_JACK}/include ${BF_FFMPEG}/include/msvc'
39 BF_JACK_LIB = 'libjack'
40 BF_JACK_LIBPATH = '${BF_JACK}/lib'
41
42 WITH_BF_SNDFILE = False
43 BF_SNDFILE = LIBDIR + '/sndfile'
44 BF_SNDFILE_INC = '${BF_SNDFILE}/include'
45 BF_SNDFILE_LIB = 'libsndfile-1'
46 BF_SNDFILE_LIBPATH = '${BF_SNDFILE}/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 BF_PTHREADS = LIBDIR + '/pthreads'
55 BF_PTHREADS_INC = '${BF_PTHREADS}/include'
56 BF_PTHREADS_LIB = 'pthreadVC2'
57 BF_PTHREADS_LIBPATH = '${BF_PTHREADS}/lib'
58
59 WITH_BF_OPENEXR = True
60 WITH_BF_STATICOPENEXR = False
61 BF_OPENEXR = LIBDIR + '/openexr'
62 BF_OPENEXR_INC = '${BF_OPENEXR}/include ${BF_OPENEXR}/include/IlmImf ${BF_OPENEXR}/include/Iex ${BF_OPENEXR}/include/Imath '
63 BF_OPENEXR_LIB = ' Iex Half IlmImf Imath IlmThread '
64 BF_OPENEXR_LIBPATH = '${BF_OPENEXR}/lib_vs2008'
65 # Warning, this static lib configuration is untested! users of this OS please confirm.
66 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'
67
68 WITH_BF_DDS = True
69
70 WITH_BF_JPEG = True
71 BF_JPEG = LIBDIR + '/jpeg'
72 BF_JPEG_INC = '${BF_JPEG}/include'
73 BF_JPEG_LIB = 'libjpeg'
74 BF_JPEG_LIBPATH = '${BF_JPEG}/lib'
75
76 WITH_BF_PNG = True
77 BF_PNG = LIBDIR + '/png'
78 BF_PNG_INC = '${BF_PNG}/include'
79 BF_PNG_LIB = 'libpng_st'
80 BF_PNG_LIBPATH = '${BF_PNG}/lib'
81
82 WITH_BF_TIFF = True
83 BF_TIFF = LIBDIR + '/tiff'
84 BF_TIFF_INC = '${BF_TIFF}/include'
85 BF_TIFF_LIB = 'libtiff'
86 BF_TIFF_LIBPATH = '${BF_TIFF}/lib'
87
88 WITH_BF_ZLIB = True
89 BF_ZLIB = LIBDIR + '/zlib'
90 BF_ZLIB_INC = '${BF_ZLIB}/include'
91 BF_ZLIB_LIB = 'libz'
92 BF_ZLIB_LIBPATH = '${BF_ZLIB}/lib'
93
94 WITH_BF_INTERNATIONAL = True
95
96 BF_GETTEXT = LIBDIR + '/gettext'
97 BF_GETTEXT_INC = '${BF_GETTEXT}/include'
98 BF_GETTEXT_LIB = 'gnu_gettext'
99 BF_GETTEXT_LIBPATH = '${BF_GETTEXT}/lib'
100
101 WITH_BF_GAMEENGINE = True
102 WITH_BF_PLAYER = False
103
104 WITH_BF_BULLET = True
105 BF_BULLET = '#extern/bullet2/src'
106 BF_BULLET_INC = '${BF_BULLET}'
107 BF_BULLET_LIB = 'extern_bullet'
108
109 BF_WINTAB = LIBDIR + '/wintab'
110 BF_WINTAB_INC = '${BF_WINTAB}/INCLUDE'
111
112 WITH_BF_BINRELOC = False
113
114 # enable freetype2 support for text objects
115 BF_WITH_FREETYPE = True
116 BF_FREETYPE = LIBDIR + '/freetype'
117 BF_FREETYPE_INC = '${BF_FREETYPE}/include ${BF_FREETYPE}/include/freetype2'
118 BF_FREETYPE_LIB = 'freetype2ST'
119 BF_FREETYPE_LIBPATH = '${BF_FREETYPE}/lib'
120
121 WITH_BF_QUICKTIME = True # -DWITH_QUICKTIME
122 BF_QUICKTIME = LIBDIR + '/QTDevWin'
123 BF_QUICKTIME_INC = '${BF_QUICKTIME}/CIncludes'
124 BF_QUICKTIME_LIB = 'qtmlClient'
125 BF_QUICKTIME_LIBPATH = '${BF_QUICKTIME}/Libraries'
126
127 WITH_BF_OPENJPEG = True 
128 BF_OPENJPEG = '#extern/libopenjpeg'
129 BF_OPENJPEG_LIB = ''
130 BF_OPENJPEG_INC = '${BF_OPENJPEG}'
131 BF_OPENJPEG_LIBPATH='${BF_OPENJPEG}/lib'
132
133 WITH_BF_FFTW3 = True
134 BF_FFTW3 = LIBDIR + '/fftw3'
135 BF_FFTW3_INC = '${BF_FFTW3}/include'
136 BF_FFTW3_LIB = 'libfftw'
137 BF_FFTW3_LIBPATH = '${BF_FFTW3}/lib'
138
139 WITH_BF_REDCODE = False  
140 BF_REDCODE_INC = '#extern'
141
142 WITH_BF_COLLADA = True
143 BF_COLLADA = '#source/blender/collada'
144 BF_COLLADA_INC = '${BF_COLLADA}'
145 BF_COLLADA_LIB = 'bf_collada'
146
147 BF_OPENCOLLADA = LIBDIR + '/opencollada'
148 BF_OPENCOLLADA_INC = '${BF_OPENCOLLADA}/include'
149 BF_OPENCOLLADA_LIB = 'OpenCOLLADAStreamWriter OpenCOLLADASaxFrameworkLoader OpenCOLLADAFramework OpenCOLLADABaseUtils GeneratedSaxParser MathMLSolver xml2 pcre buffer ftoa UTF'
150 BF_OPENCOLLADA_LIBPATH = '${BF_OPENCOLLADA}/lib'
151
152 #Ray trace optimization
153 WITH_BF_RAYOPTIMIZATION = True
154 BF_RAYOPTIMIZATION_SSE_FLAGS = ['/arch:SSE']
155
156 WITH_BF_STATICOPENGL = False
157 BF_OPENGL_INC = '${BF_OPENGL}/include'
158 BF_OPENGL_LIBINC = '${BF_OPENGL}/lib'
159 BF_OPENGL_LIB = 'opengl32 glu32'
160 BF_OPENGL_LIB_STATIC = [ '${BF_OPENGL}/lib/libGL.a', '${BF_OPENGL}/lib/libGLU.a',
161                          '${BF_OPENGL}/lib/libXmu.a', '${BF_OPENGL}/lib/libXext.a',
162                          '${BF_OPENGL}/lib/libX11.a', '${BF_OPENGL}/lib/libXi.a' ]
163                          
164 CC = 'cl.exe'
165 CXX = 'cl.exe'
166
167 CCFLAGS = ['/nologo', '/Ob1', '/J', '/W0', '/Gd', '/wd4018', '/wd4244', '/wd4305', '/wd4800', '/wd4065', '/wd4267', '/we4013']
168 CXXFLAGS = ['/EHsc']
169 BGE_CXXFLAGS = ['/O2', '/EHsc', '/GR', '/fp:fast', '/arch:SSE']
170
171 BF_DEBUG_CCFLAGS = ['/Zi', '/FR${TARGET}.sbr']
172
173 CPPFLAGS = ['-DWIN32','-D_CONSOLE', '-D_LIB', '-DFTGL_LIBRARY_STATIC', '-D_CRT_SECURE_NO_DEPRECATE']
174 REL_CFLAGS = ['-O2', '-DNDEBUG']
175 REL_CCFLAGS = ['-O2', '-DNDEBUG']
176 REL_CXXFLAGS = ['-O2', '-DNDEBUG']
177
178 C_WARN = []
179 CC_WARN = []
180 CXX_WARN = []
181
182 LLIBS = ['ws2_32', 'vfw32', 'winmm', 'kernel32', 'user32', 'gdi32', 'comdlg32', 'advapi32', 'shfolder', 'shell32', 'ole32', 'oleaut32', 'uuid']
183
184 PLATFORM_LINKFLAGS = ['/SUBSYSTEM:CONSOLE','/MACHINE:IX86','/STACK:2097152','/INCREMENTAL:NO', '/LARGEADDRESSAWARE']
185
186 # # Todo
187 # BF_PROFILE_CCFLAGS = ['-pg', '-g ']
188 # BF_PROFILE_LINKFLAGS = ['-pg']
189 # BF_PROFILE = False
190
191 BF_BSC=False
192
193 BF_BUILDDIR = '..\\build\\win32-vc'
194 BF_INSTALLDIR='..\\install\\win32-vc'