OpenSubdiv: Commit of OpenSubdiv integration into Blender
[blender.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.4'
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 = 'python${BF_PYTHON_VERSION[0]}${BF_PYTHON_VERSION[2]}'
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_ICONV = False
115 BF_ICONV = LIBDIR + "/iconv"
116 BF_ICONV_INC = '${BF_ICONV}/include'
117 BF_ICONV_LIB = 'iconv'
118 BF_ICONV_LIBPATH = '${BF_ICONV}/lib'
119
120 WITH_BF_REDCODE = False
121 BF_REDCODE_INC = '#extern'
122
123 # Mesa Libs should go here if your using them as well....
124 WITH_BF_STATICOPENGL = False
125 BF_OPENGL = 'C:\\MingW'
126 BF_OPENGL_INC = '${BF_OPENGL}/include'
127 BF_OPENGL_LIBINC = '${BF_OPENGL}/lib'
128 BF_OPENGL_LIB = 'opengl32 glu32'
129 BF_OPENGL_LIB_STATIC = [ '${BF_OPENGL}/lib/libGL.a', '${BF_OPENGL}/lib/libGLU.a',
130              '${BF_OPENGL}/lib/libXmu.a', '${BF_OPENGL}/lib/libXext.a',
131              '${BF_OPENGL}/lib/libX11.a', '${BF_OPENGL}/lib/libXi.a' ]
132
133 WITH_BF_COLLADA = True
134 BF_COLLADA = '#source/blender/collada'
135 BF_COLLADA_INC = '${BF_COLLADA}'
136 BF_COLLADA_LIB = 'bf_collada'
137
138 BF_OPENCOLLADA = LIBDIR + '/opencollada'
139 BF_OPENCOLLADA_INC = '${BF_OPENCOLLADA}/include/opencollada'
140 BF_OPENCOLLADA_LIB = 'OpenCOLLADAStreamWriter OpenCOLLADASaxFrameworkLoader OpenCOLLADAFramework OpenCOLLADABaseUtils GeneratedSaxParser UTF MathMLSolver pcre buffer ftoa xml'
141 BF_OPENCOLLADA_LIBPATH = '${BF_OPENCOLLADA}/lib/opencollada'
142
143 #Cycles
144 WITH_BF_CYCLES = True
145 WITH_BF_CYCLES_CUDA_BINARIES = False
146 BF_CYCLES_CUDA_NVCC = "" # Path to the NVIDIA CUDA compiler
147 BF_CYCLES_CUDA_BINARIES_ARCH = ['sm_20', 'sm_21', 'sm_30', 'sm_35', 'sm_50', 'sm_52']
148
149 WITH_BF_OIIO = True
150 BF_OIIO = LIBDIR + '/openimageio'
151 BF_OIIO_INC = '${BF_OIIO}/include'
152 BF_OIIO_LIB = 'OpenImageIO'
153 BF_OIIO_LIBPATH = '${BF_OIIO}/lib'
154
155 WITH_BF_OCIO = True
156 BF_OCIO = LIBDIR + '/opencolorio'
157 BF_OCIO_INC = '${BF_OCIO}/include'
158 BF_OCIO_LIB = 'OpenColorIO'
159 BF_OCIO_LIBPATH = '${BF_OCIO}/lib'
160
161 WITH_BF_BOOST = True
162 BF_BOOST = LIBDIR + '/boost'
163 BF_BOOST_INC = '${BF_BOOST}/include'
164 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'
165 BF_BOOST_LIB_INTERNATIONAL = ' boost_locale-mgw47-mt-s-1_49 boost_locale-mgw47-mt-sd-1_49'
166 BF_BOOST_LIBPATH = '${BF_BOOST}/lib'
167
168 WITH_BF_OPENSUBDIV = False
169 BF_OPENSUBDIV = LIBDIR + '/opensubdiv'
170 BF_OPENSUBDIV_INC = '${BF_OPENSUBDIV}/include'
171 BF_OPENSUBDIV_LIB = 'osdCPU osdGPU'
172 BF_OPENSUBDIV_LIBPATH = '${BF_OPENSUBDIV}/lib'
173
174 #Ray trace optimization
175 WITH_BF_RAYOPTIMIZATION = True
176 BF_RAYOPTIMIZATION_SSE_FLAGS = ['-mmmx', '-msse', '-msse2']
177
178 WITH_BF_IME = True
179
180 WITH_BF_OPENMP = True
181
182 #Freestyle
183 WITH_BF_FREESTYLE = True
184
185 ##
186 CC = 'gcc'
187 CXX = 'g++'
188
189 CCFLAGS = [ '-pipe', '-funsigned-char', '-fno-strict-aliasing' ]
190 CXXFLAGS = [ '-fpermissive' ]
191
192 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']
193 REL_CFLAGS = []
194 REL_CXXFLAGS = []
195 REL_CCFLAGS = ['-O2', '-ftree-vectorize']
196
197 # NOTE: C_WARN seems to get ignored - at least -Wno-char-subscripts doesn't work!
198 C_WARN = ['-Wno-char-subscripts', '-Wdeclaration-after-statement', '-Wstrict-prototypes']
199
200 CC_WARN = [ '-Wall', '-Wno-char-subscripts' ]
201
202 LLIBS = ['-lshell32', '-lshfolder', '-lgdi32', '-lmsvcrt', '-lwinmm', '-lmingw32', '-lm', '-lws2_32', '-lz', '-lstdc++','-lole32','-luuid', '-lwsock32', '-lpsapi', '-lpthread', '-ldbghelp']
203
204 if WITH_BF_IME:
205     LLIBS.append('-limm32')
206
207 PLATFORM_LINKFLAGS = ['-Xlinker', '--stack=2097152']
208
209 ## DISABLED, causes linking errors!
210 ## for re-distribution, so users dont need mingw installed
211 # PLATFORM_LINKFLAGS += ["-static-libgcc", "-static-libstdc++"]
212
213 BF_DEBUG = False
214 BF_DEBUG_CCFLAGS= ['-g']
215
216 BF_PROFILE_CCFLAGS = ['-pg', '-g']
217 BF_PROFILE_LINKFLAGS = ['-pg']
218 BF_PROFILE_FLAGS = BF_PROFILE_CCFLAGS
219 BF_PROFILE = False
220
221 BF_BUILDDIR = '..\\build\\win64-mingw'
222 BF_INSTALLDIR='..\\install\\win64-mingw'