e82b6e8a73f49d08a04f25cc7e6c271d8b39b95e
[blender-staging.git] / build_files / scons / config / win64-mingw-config.py
1 LCGDIR = '#../lib/mingw64'
2 LIBDIR = "${LCGDIR}"
3
4 BF_PYTHON = LIBDIR + '/python'
5 BF_PYTHON_VERSION = '3.3'
6 WITH_BF_STATICPYTHON = False
7 BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}'
8 BF_PYTHON_BINARY = 'python'
9 BF_PYTHON_LIB = 'python${BF_PYTHON_VERSION[0]}${BF_PYTHON_VERSION[2]}mw'
10 BF_PYTHON_DLL = 'python33'
11 BF_PYTHON_LIBPATH = '${BF_PYTHON}/lib'
12
13 WITH_BF_OPENAL = True
14 BF_OPENAL = LIBDIR + '/openal'
15 BF_OPENAL_INC = '${BF_OPENAL}/include'
16 BF_OPENAL_LIB = 'wrap_oal'
17 BF_OPENAL_LIBPATH = '${BF_OPENAL}/lib'
18
19 WITH_BF_FFMPEG = True
20 BF_FFMPEG_LIB = 'avformat.dll avcodec.dll avdevice.dll avutil.dll swscale.dll swresample.dll'
21 BF_FFMPEG_LIBPATH = LIBDIR + '/ffmpeg/lib'
22 BF_FFMPEG_INC =  LIBDIR + '/ffmpeg/include'
23 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_FFMPEG_LIBPATH}/swresample-0.dll ${BF_FFMPEG_LIBPATH}/xvidcore.dll'
24
25 WITH_BF_JACK = False
26 BF_JACK = LIBDIR + '/jack'
27 BF_JACK_INC = '${BF_JACK}/include'
28 BF_JACK_LIB = 'libjack'
29 BF_JACK_LIBPATH = '${BF_JACK}/lib'
30
31 WITH_BF_SNDFILE = False
32 BF_SNDFILE = LIBDIR + '/sndfile'
33 BF_SNDFILE_INC = '${BF_SNDFILE}/include'
34 BF_SNDFILE_LIB = 'libsndfile-1'
35 BF_SNDFILE_LIBPATH = '${BF_SNDFILE}/lib'
36
37 WITH_BF_SDL = True
38 BF_SDL = LIBDIR + '/sdl'
39 BF_SDL_INC = '${BF_SDL}/include'
40 BF_SDL_LIB = 'SDL'
41 BF_SDL_LIBPATH = '${BF_SDL}/lib'
42
43 BF_PTHREADS = '' # Part of MinGW-w64
44 BF_PTHREADS_INC = ''
45 BF_PTHREADS_LIB = ''
46 BF_PTHREADS_LIBPATH = ''
47
48 WITH_BF_OPENEXR = True
49 WITH_BF_STATICOPENEXR = False
50 BF_OPENEXR = LIBDIR + '/openexr'
51 BF_OPENEXR_INC = '${BF_OPENEXR}/include ${BF_OPENEXR}/include/OpenEXR'
52 BF_OPENEXR_LIB = 'Half IlmImf Imath IlmThread Iex'
53 BF_OPENEXR_LIBPATH = '${BF_OPENEXR}/lib'
54
55 WITH_BF_DDS = True
56
57 WITH_BF_JPEG = True
58 BF_JPEG = LIBDIR + '/jpeg'
59 BF_JPEG_INC = '${BF_JPEG}/include'
60 BF_JPEG_LIB = 'jpeg'
61 BF_JPEG_LIBPATH = '${BF_JPEG}/lib'
62
63 WITH_BF_PNG = True
64 BF_PNG = LIBDIR + '/png'
65 BF_PNG_INC = '${BF_PNG}/include'
66 BF_PNG_LIB = 'png'
67 BF_PNG_LIBPATH = '${BF_PNG}/lib'
68
69 WITH_BF_TIFF = True
70 BF_TIFF = LIBDIR + '/tiff'
71 BF_TIFF_INC = '${BF_TIFF}/include'
72 BF_TIFF_LIB = 'tiff'
73 BF_TIFF_LIBPATH = '${BF_TIFF}/lib'
74
75 WITH_BF_ZLIB = True
76 BF_ZLIB = LIBDIR + '/zlib'
77 BF_ZLIB_INC = '${BF_ZLIB}/include'
78 BF_ZLIB_LIB = 'z'
79 BF_ZLIB_LIBPATH = '${BF_ZLIB}/lib'
80
81 WITH_BF_INTERNATIONAL = True
82
83 WITH_BF_OPENJPEG = True
84 BF_OPENJPEG = '#extern/libopenjpeg'
85 BF_OPENJPEG_LIB = ''
86 BF_OPENJPEG_INC = '${BF_OPENJPEG}'
87 BF_OPENJPEG_LIBPATH='${BF_OPENJPEG}/lib'
88
89 WITH_BF_FFTW3 = True
90 BF_FFTW3 = LIBDIR + '/fftw3'
91 BF_FFTW3_INC = '${BF_FFTW3}/include'
92 BF_FFTW3_LIB = 'fftw3'
93 BF_FFTW3_LIBPATH = '${BF_FFTW3}/lib'
94
95 WITH_BF_GAMEENGINE = True
96 WITH_BF_OCEANSIM = True
97 WITH_BF_PLAYER = True
98 WITH_BF_LIBMV = True
99
100 WITH_BF_BULLET = True
101 BF_BULLET = '#extern/bullet2/src'
102 BF_BULLET_INC = '${BF_BULLET}'
103 BF_BULLET_LIB = 'extern_bullet'
104
105 BF_WINTAB = LIBDIR + '/wintab'
106 BF_WINTAB_INC = '${BF_WINTAB}/INCLUDE'
107
108 # enable freetype2 support for text objects
109 BF_FREETYPE = LIBDIR + '/freetype'
110 BF_FREETYPE_INC = '${BF_FREETYPE}/include ${BF_FREETYPE}/include/freetype2/'
111 BF_FREETYPE_LIB = 'freetype'
112 BF_FREETYPE_LIBPATH = '${BF_FREETYPE}/lib'
113
114 WITH_BF_QUICKTIME = False
115
116 WITH_BF_ICONV = False
117 BF_ICONV = LIBDIR + "/iconv"
118 BF_ICONV_INC = '${BF_ICONV}/include'
119 BF_ICONV_LIB = 'iconv'
120 BF_ICONV_LIBPATH = '${BF_ICONV}/lib'
121
122 WITH_BF_REDCODE = False
123 BF_REDCODE_INC = '#extern'
124
125 # Mesa Libs should go here if your using them as well....
126 WITH_BF_STATICOPENGL = False
127 BF_OPENGL = 'C:\\MingW'
128 BF_OPENGL_INC = '${BF_OPENGL}/include'
129 BF_OPENGL_LIBINC = '${BF_OPENGL}/lib'
130 BF_OPENGL_LIB = 'opengl32 glu32'
131 BF_OPENGL_LIB_STATIC = [ '${BF_OPENGL}/lib/libGL.a', '${BF_OPENGL}/lib/libGLU.a',
132              '${BF_OPENGL}/lib/libXmu.a', '${BF_OPENGL}/lib/libXext.a',
133              '${BF_OPENGL}/lib/libX11.a', '${BF_OPENGL}/lib/libXi.a' ]
134
135 WITH_BF_COLLADA = True
136 BF_COLLADA = '#source/blender/collada'
137 BF_COLLADA_INC = '${BF_COLLADA}'
138 BF_COLLADA_LIB = 'bf_collada'
139
140 BF_OPENCOLLADA = LIBDIR + '/opencollada'
141 BF_OPENCOLLADA_INC = '${BF_OPENCOLLADA}/include/opencollada'
142 BF_OPENCOLLADA_LIB = 'OpenCOLLADAStreamWriter OpenCOLLADASaxFrameworkLoader OpenCOLLADAFramework OpenCOLLADABaseUtils GeneratedSaxParser UTF MathMLSolver pcre buffer ftoa xml'
143 BF_OPENCOLLADA_LIBPATH = '${BF_OPENCOLLADA}/lib/opencollada'
144
145 #Cycles
146 WITH_BF_CYCLES = True
147 WITH_BF_CYCLES_CUDA_BINARIES = False
148 BF_CYCLES_CUDA_NVCC = "" # Path to the NVIDIA CUDA compiler
149 BF_CYCLES_CUDA_BINARIES_ARCH = ['sm_20', 'sm_21', 'sm_30', 'sm_35']
150
151 WITH_BF_OIIO = True
152 BF_OIIO = LIBDIR + '/openimageio'
153 BF_OIIO_INC = '${BF_OIIO}/include'
154 BF_OIIO_LIB = 'OpenImageIO'
155 BF_OIIO_LIBPATH = '${BF_OIIO}/lib'
156
157 WITH_BF_OCIO = True
158 BF_OCIO = LIBDIR + '/opencolorio'
159 BF_OCIO_INC = '${BF_OCIO}/include'
160 BF_OCIO_LIB = 'OpenColorIO'
161 BF_OCIO_LIBPATH = '${BF_OCIO}/lib'
162
163 WITH_BF_BOOST = True
164 BF_BOOST = LIBDIR + '/boost'
165 BF_BOOST_INC = '${BF_BOOST}/include'
166 BF_BOOST_LIB = 'boost_date_time-mgw47-mt-s-1_49 boost_date_time-mgw47-mt-sd-1_49 boost_filesystem-mgw47-mt-s-1_49 boost_filesystem-mgw47-mt-sd-1_49 boost_regex-mgw47-mt-s-1_49 boost_regex-mgw47-mt-sd-1_49 boost_system-mgw47-mt-s-1_49 boost_system-mgw47-mt-sd-1_49 boost_thread-mgw47-mt-s-1_49 boost_thread-mgw47-mt-sd-1_49'
167 BF_BOOST_LIB_INTERNATIONAL = ' boost_locale-mgw47-mt-s-1_49 boost_locale-mgw47-mt-sd-1_49'
168 BF_BOOST_LIBPATH = '${BF_BOOST}/lib'
169
170 #Ray trace optimization
171 WITH_BF_RAYOPTIMIZATION = True
172 BF_RAYOPTIMIZATION_SSE_FLAGS = ['-mmmx', '-msse', '-msse2']
173
174 #May produce errors with unsupported MinGW-w64 builds
175 WITH_BF_OPENMP = False
176
177 #Freestyle
178 WITH_BF_FREESTYLE = True
179
180 ##
181 CC = 'gcc'
182 CXX = 'g++'
183
184 CCFLAGS = [ '-pipe', '-funsigned-char', '-fno-strict-aliasing' ]
185 CXXFLAGS = [ '-fpermissive' ]
186
187 CPPFLAGS = ['-DWIN32', '-DMS_WIN64', '-DFREE_WINDOWS', '-DFREE_WINDOWS64', '-D_LARGEFILE_SOURCE', '-D_FILE_OFFSET_BITS=64', '-D_LARGEFILE64_SOURCE', '-DBOOST_ALL_NO_LIB', '-DBOOST_THREAD_USE_LIB', '-DGLEW_STATIC', '-DOPJ_STATIC']
188 REL_CFLAGS = []
189 REL_CXXFLAGS = []
190 REL_CCFLAGS = ['-DNDEBUG', '-O2', '-ftree-vectorize']
191
192 C_WARN = ['-Wno-char-subscripts', '-Wdeclaration-after-statement', '-Wstrict-prototypes']
193
194 CC_WARN = [ '-Wall' ]
195
196 LLIBS = ['-lshell32', '-lshfolder', '-lgdi32', '-lmsvcrt', '-lwinmm', '-lmingw32', '-lm', '-lws2_32', '-lz', '-lstdc++','-lole32','-luuid', '-lwsock32', '-lpsapi', '-lpthread']
197
198 PLATFORM_LINKFLAGS = ['-Xlinker', '--stack=2097152']
199
200 ## DISABLED, causes linking errors!
201 ## for re-distribution, so users dont need mingw installed
202 # PLATFORM_LINKFLAGS += ["-static-libgcc", "-static-libstdc++"]
203
204 BF_DEBUG = False
205 BF_DEBUG_CCFLAGS= ['-g', '-D_DEBUG']
206
207 BF_PROFILE_CCFLAGS = ['-pg', '-g']
208 BF_PROFILE_LINKFLAGS = ['-pg']
209 BF_PROFILE_FLAGS = BF_PROFILE_CCFLAGS
210 BF_PROFILE = False
211
212 BF_BUILDDIR = '..\\build\\win64-mingw'
213 BF_INSTALLDIR='..\\install\\win64-mingw'