diff options
Diffstat (limited to 'SConstruct')
-rw-r--r-- | SConstruct | 29 |
1 files changed, 24 insertions, 5 deletions
diff --git a/SConstruct b/SConstruct index e928970f6b8..053f414c954 100644 --- a/SConstruct +++ b/SConstruct @@ -306,9 +306,10 @@ if env['BF_NO_ELBEEM'] == 1: env['CXXFLAGS'].append('-DDISABLE_ELBEEM') env['CCFLAGS'].append('-DDISABLE_ELBEEM') -if env['WITH_BF_SDL'] == False and env['OURPLATFORM'] in ('win32-vc', 'win32-ming', 'win64-vc'): - env['PLATFORM_LINKFLAGS'].remove('/ENTRY:mainCRTStartup') - env['PLATFORM_LINKFLAGS'].append('/ENTRY:main') +# TODO, make optional +env['CPPFLAGS'].append('-DWITH_AUDASPACE') +env['CXXFLAGS'].append('-DWITH_AUDASPACE') +env['CCFLAGS'].append('-DWITH_AUDASPACE') # lastly we check for root_build_dir ( we should not do before, otherwise we might do wrong builddir B.root_build_dir = env['BF_BUILDDIR'] @@ -360,6 +361,23 @@ if not quickie and do_clean: print B.bc.HEADER+'Already Clean, nothing to do.'+B.bc.ENDC Exit() + +# ensure python header is found since detection can fail, this could happen +# with _any_ library but since we used a fixed python version this tends to +# be most problematic. +if env['WITH_BF_PYTHON']: + py_h = os.path.join(Dir(env.subst('${BF_PYTHON_INC}')).abspath, "Python.h") + + if not os.path.exists(py_h): + print("\nMissing: \"" + env.subst('${BF_PYTHON_INC}') + os.sep + "Python.h\",\n" + " Set 'BF_PYTHON_INC' to point " + "to a valid python include path.\n Containing " + "Python.h for python version \"" + env.subst('${BF_PYTHON_VERSION}') + "\"") + + Exit() + del py_h + + if not os.path.isdir ( B.root_build_dir): os.makedirs ( B.root_build_dir ) os.makedirs ( B.root_build_dir + 'source' ) @@ -409,17 +427,18 @@ if B.arguments.get('BF_PRIORITYLIST', '0')=='1': B.propose_priorities() dobj = B.buildinfo(env, "dynamic") + B.resources +creob = B.creator(env) thestatlibs, thelibincs = B.setup_staticlibs(env) thesyslibs = B.setup_syslibs(env) if 'blender' in B.targets or not env['WITH_BF_NOBLENDER']: - env.BlenderProg(B.root_build_dir, "blender", mainlist + thestatlibs + dobj, thesyslibs, [B.root_build_dir+'/lib'] + thelibincs, 'blender') + env.BlenderProg(B.root_build_dir, "blender", creob + mainlist + thestatlibs + dobj, thesyslibs, [B.root_build_dir+'/lib'] + thelibincs, 'blender') if env['WITH_BF_PLAYER']: playerlist = B.create_blender_liblist(env, 'player') playerlist += B.create_blender_liblist(env, 'player2') playerlist += B.create_blender_liblist(env, 'intern') playerlist += B.create_blender_liblist(env, 'extern') - env.BlenderProg(B.root_build_dir, "blenderplayer", playerlist + thestatlibs + dobj, thesyslibs, [B.root_build_dir+'/lib'] + thelibincs, 'blenderplayer') + env.BlenderProg(B.root_build_dir, "blenderplayer", dobj + playerlist + thestatlibs, thesyslibs, [B.root_build_dir+'/lib'] + thelibincs, 'blenderplayer') ##### Now define some targets |