forked from bartvdbraak/blender
64dd45ef43
* add preliminary support for building Blender on 64bit Windows with _msvc_. The SConstruct should automatically detect if you are on a 64bit Windows and if you have that 64bit build is assumed. If you're not, 32bit build is assumed. NOTE: this is still very much wip, so your mileage may vary. Do please report on b25 taskforce ML in case of trouble. NOTE2: many of the libs are being linked in statically NOTE3: hopefully I didn't break anything for other build platforms (mingw, linux, osx). NOTE4: comes after NOTE3
35 lines
1.3 KiB
Python
35 lines
1.3 KiB
Python
#!/usr/bin/python
|
|
import sys
|
|
|
|
Import('env')
|
|
|
|
defs = 'USE_DOUBLES QHULL _LIB'
|
|
cflags = []
|
|
|
|
if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
|
|
defs += ' WIN32 NDEBUG _WINDOWS _LIB'
|
|
cflags += ['/MT', '/W3', '/GX', '/Og', '/Ot', '/Ob1', '/Op', '/G6']
|
|
elif env['OURPLATFORM']=='win32-mingw':
|
|
defs += ' NDEBUG'
|
|
cflags += ['-O2']
|
|
elif sys.platform=='linux2' or sys.platform=='linux-i386' or sys.platform=='freebsd4' or sys.platform=='freebsd5' or sys.platform=='openbsd3' or sys.platform=='sunos5':
|
|
defs += ' NDEBUG'
|
|
cflags += ['-O2']
|
|
elif sys.platform=='darwin' :
|
|
defs += ' NDEBUG'
|
|
cflags += ['-O2','-pipe', '-fPIC', '-funsigned-char', '-ffast-math']
|
|
|
|
else:
|
|
print "################################################"
|
|
print
|
|
print "Check if solid builds on your platform correctly"
|
|
print "Add your platform specific defines"
|
|
print "and cflags / cxxflags to the"
|
|
print "extern/solid/SConscript file"
|
|
|
|
sources = env.Glob('src/*.cpp') + env.Glob('src/convex/*.cpp') + env.Glob('src/complex/*.cpp') + env.Glob('src/broad/*.cpp')
|
|
|
|
incs = 'include src src/broad src/complex src/convex ../qhull/include'
|
|
|
|
env.BlenderLib ( libname='extern_solid', sources=sources, includes=Split(incs), defines=Split(defs), libtype=['extern'], priority=[10] , compileflags = cflags)
|