Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Letwory <nathan@letworyinteractive.com>2011-06-08 15:53:07 +0400
committerNathan Letwory <nathan@letworyinteractive.com>2011-06-08 15:53:07 +0400
commit899f2776db6f41f5bb05342826280f31b66ec79c (patch)
tree378939fe4e251d84861a82006b27698110814d87 /build_files/scons/tools
parentcec102e7813a6eeb45223be9c14d4850146f5d8e (diff)
Shuffle some build code around to ensure debug builds on Windows actually run too.
* creator/SConscript is now empty, code is moved to an emitter function in Blender.py * make sure COLLADA debug libs are used when BF_DEBUG=True
Diffstat (limited to 'build_files/scons/tools')
-rw-r--r--build_files/scons/tools/Blender.py59
1 files changed, 51 insertions, 8 deletions
diff --git a/build_files/scons/tools/Blender.py b/build_files/scons/tools/Blender.py
index 8dbed82ed84..50f43a03b8b 100644
--- a/build_files/scons/tools/Blender.py
+++ b/build_files/scons/tools/Blender.py
@@ -258,7 +258,10 @@ def setup_syslibs(lenv):
syslibs += Split(lenv['BF_PTHREADS_LIB'])
if lenv['WITH_BF_COLLADA']:
syslibs.append(lenv['BF_PCRE_LIB'])
- syslibs += Split(lenv['BF_OPENCOLLADA_LIB'])
+ if lenv['BF_DEBUG']:
+ syslibs += [colladalib+'_d' for colladalib in Split(lenv['BF_OPENCOLLADA_LIB'])]
+ else:
+ syslibs += Split(lenv['BF_OPENCOLLADA_LIB'])
syslibs.append(lenv['BF_EXPAT_LIB'])
if not lenv['WITH_BF_STATICLIBSAMPLERATE']:
@@ -287,6 +290,50 @@ def propose_priorities():
print "\t\t",new_priority, v
new_priority += 5
+# emits the necessary file objects for creator.c, to be used in creating
+# the final blender executable
+def creator(env):
+ sources = ['creator.c']# + Blender.buildinfo(env, "dynamic") + Blender.resources
+
+ incs = ['#/intern/guardedalloc', '#/source/blender/blenlib', '#/source/blender/blenkernel', '#/source/blender/editors/include', '#/source/blender/blenloader', '#/source/blender/imbuf', '#/source/blender/renderconverter', '#/source/blender/render/extern/include', '#/source/blender/windowmanager', '#/source/blender/makesdna', '#/source/blender/makesrna', '#/source/gameengine/BlenderRoutines', '#/extern/glew/include', '#/source/blender/gpu', env['BF_OPENGL_INC']]
+
+ defs = []
+ if env['WITH_BF_QUICKTIME']:
+ incs.append(env['BF_QUICKTIME_INC'])
+ defs.append('WITH_QUICKTIME')
+
+ if env['WITH_BF_BINRELOC']:
+ incs.append('#/extern/binreloc/include')
+ defs.append('WITH_BINRELOC')
+
+ if env['WITH_BF_OPENEXR']:
+ defs.append('WITH_OPENEXR')
+
+ if env['WITH_BF_TIFF']:
+ defs.append('WITH_TIFF')
+
+ if not env['WITH_BF_SDL']:
+ defs.append('DISABLE_SDL')
+
+ if env['WITH_BF_PYTHON']:
+ incs.append('#/source/blender/python')
+ defs.append('WITH_PYTHON')
+ if env['BF_DEBUG']:
+ defs.append('_DEBUG')
+
+ if env['BF_BUILDINFO']:
+ defs.append('BUILD_DATE')
+ defs.append('NAN_BUILDINFO')
+
+ if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'):
+ incs.append(env['BF_PTHREADS_INC'])
+
+ env.Append(CPPDEFINES=defs)
+ env.Append(CPPPATH=incs)
+ obj = [env.Object(root_build_dir+'source/creator/creator/creator', ['#source/creator/creator.c'])]
+
+ return obj
+
## TODO: see if this can be made in an emitter
def buildinfo(lenv, build_type):
"""
@@ -324,7 +371,7 @@ def buildinfo(lenv, build_type):
lenv.Append (CPPPATH = [root_build_dir+'source/blender/blenkernel'])
- obj = [lenv.Object (root_build_dir+'source/creator/%s_buildinfo'%build_type, [root_build_dir+'source/creator/buildinfo.c'])]
+ obj = [lenv.Object (root_build_dir+'source/creator/%s_buildinfo'%build_type, ['#source/creator/buildinfo.c'])]
return obj
@@ -714,23 +761,19 @@ class BlenderEnvironment(SConsEnvironment):
global vcp
print bc.HEADER+'Configuring program '+bc.ENDC+bc.OKGREEN+progname+bc.ENDC
lenv = self.Clone()
+ lenv.Append(LINKFLAGS = lenv['PLATFORM_LINKFLAGS'])
if lenv['OURPLATFORM'] in ('win32-vc', 'cygwin', 'win64-vc'):
- lenv.Append(LINKFLAGS = lenv['PLATFORM_LINKFLAGS'])
- lenv.Append(LINKFLAGS = ['/FORCE:MULTIPLE'])
if lenv['BF_DEBUG']:
- lenv.Prepend(LINKFLAGS = ['/DEBUG','/PDB:'+progname+'.pdb'])
+ lenv.Prepend(LINKFLAGS = ['/DEBUG','/PDB:'+progname+'.pdb','/NODEFAULTLIB:libcmt'])
if lenv['OURPLATFORM']=='linux2':
- lenv.Append(LINKFLAGS = lenv['PLATFORM_LINKFLAGS'])
if lenv['WITH_BF_PYTHON']:
lenv.Append(LINKFLAGS = lenv['BF_PYTHON_LINKFLAGS'])
if lenv['OURPLATFORM']=='sunos5':
- lenv.Append(LINKFLAGS = lenv['PLATFORM_LINKFLAGS'])
if lenv['WITH_BF_PYTHON']:
lenv.Append(LINKFLAGS = lenv['BF_PYTHON_LINKFLAGS'])
if lenv['CXX'].endswith('CC'):
lenv.Replace(LINK = '$CXX')
if lenv['OURPLATFORM']=='darwin':
- lenv.Append(LINKFLAGS = lenv['PLATFORM_LINKFLAGS'])
if lenv['WITH_BF_PYTHON']:
lenv.Append(LINKFLAGS = lenv['BF_PYTHON_LINKFLAGS'])
lenv.Append(LINKFLAGS = lenv['BF_OPENGL_LINKFLAGS'])