Clear scons installation directory when WITHOUT_BF_INSTALL is disabled.
After discussion with Brecht and Martin we agree this is best long term. Also fixed "scons blenderlite" for python and fluid.
This commit is contained in:
24
SConstruct
24
SConstruct
@@ -188,8 +188,16 @@ opts.Update(env)
|
||||
if not env['BF_FANCY']:
|
||||
B.bc.disable()
|
||||
|
||||
|
||||
# remove install dir so old and new files are not mixed.
|
||||
if not env['WITHOUT_BF_INSTALL']:
|
||||
if os.path.isdir(env['BF_INSTALLDIR']):
|
||||
print B.bc.OKGREEN + "Clearing installation directory%s: %s" % (B.bc.ENDC, os.path.abspath(env['BF_INSTALLDIR']))
|
||||
shutil.rmtree(env['BF_INSTALLDIR'])
|
||||
|
||||
|
||||
SetOption('num_jobs', int(env['BF_NUMJOBS']))
|
||||
print "Build with %d parallel jobs" % (GetOption('num_jobs'))
|
||||
print B.bc.OKGREEN + "Build with parallel jobs%s: %s" % (B.bc.ENDC, GetOption('num_jobs'))
|
||||
|
||||
# BLENDERPATH is a unix only option to enable typical style paths this is
|
||||
# spesifically a data-dir, which is used a lot but cant replace BF_INSTALLDIR
|
||||
@@ -200,12 +208,6 @@ if env['WITH_BF_FHS']:
|
||||
else:
|
||||
BLENDERPATH = env['BF_INSTALLDIR']
|
||||
|
||||
# disable elbeem (fluidsim) compilation?
|
||||
if env['BF_NO_ELBEEM'] == 1:
|
||||
env['CPPFLAGS'].append('-DDISABLE_ELBEEM')
|
||||
env['CXXFLAGS'].append('-DDISABLE_ELBEEM')
|
||||
env['CCFLAGS'].append('-DDISABLE_ELBEEM')
|
||||
|
||||
if env['WITH_BF_OPENMP'] == 1:
|
||||
if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
|
||||
env['CCFLAGS'].append('/openmp')
|
||||
@@ -319,6 +321,12 @@ if 'blenderlite' in B.targets:
|
||||
if k not in B.arguments:
|
||||
env[k] = v
|
||||
|
||||
# disable elbeem (fluidsim) compilation?
|
||||
if env['BF_NO_ELBEEM'] == 1:
|
||||
env['CPPFLAGS'].append('-DDISABLE_ELBEEM')
|
||||
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')
|
||||
@@ -394,7 +402,7 @@ else:
|
||||
if toolset=='msvc':
|
||||
B.msvc_hack(env)
|
||||
|
||||
print B.bc.HEADER+'Building in '+B.bc.ENDC+B.root_build_dir
|
||||
print B.bc.HEADER+'Building in: ' + B.bc.ENDC + os.path.abspath(B.root_build_dir)
|
||||
env.SConsignFile(B.root_build_dir+'scons-signatures')
|
||||
B.init_lib_dict()
|
||||
|
||||
|
@@ -75,6 +75,8 @@ if env['WITH_BF_JACK']:
|
||||
if env['BF_UNIT_TEST']:
|
||||
defs.append('UNIT_TEST')
|
||||
|
||||
if not env['WITH_BF_PYTHON']:
|
||||
defs.append('DISABLE_PYTHON')
|
||||
|
||||
if env['OURPLATFORM'] == 'linux2':
|
||||
cflags='-pthread'
|
||||
|
Reference in New Issue
Block a user