diff options
Diffstat (limited to 'SConstruct')
-rw-r--r-- | SConstruct | 54 |
1 files changed, 42 insertions, 12 deletions
diff --git a/SConstruct b/SConstruct index 52fef2f3b87..573d4c1934f 100644 --- a/SConstruct +++ b/SConstruct @@ -470,6 +470,14 @@ if env['OURPLATFORM']=='darwin': ################### End Automatic configuration for OSX ################## ############################################################################# +if env['OURPLATFORM'] == 'linux' and not env['C_COMPILER_ID']: + command = ["%s"%env['CC'], "--version"] + line = btools.get_command_output(command) + if line.startswith('gcc'): + env['C_COMPILER_ID'] = 'gcc' + elif 'clang' in line[0]: + env['C_COMPILER_ID'] = 'clang' + if env['WITH_BF_OPENMP'] == 1: if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'): env['CCFLAGS'].append('/openmp') @@ -758,6 +766,9 @@ if B.targets != ['cudakernels']: data_to_c_simple("release/datafiles/preview_cycles.blend") # --- glsl --- + data_to_c_simple("source/blender/gpu/shaders/gpu_program_smoke_frag.glsl") + data_to_c_simple("source/blender/gpu/shaders/gpu_program_smoke_color_frag.glsl") + data_to_c_simple("source/blender/gpu/shaders/gpu_shader_simple_frag.glsl") data_to_c_simple("source/blender/gpu/shaders/gpu_shader_simple_vert.glsl") data_to_c_simple("source/blender/gpu/shaders/gpu_shader_material.glsl") @@ -871,19 +882,21 @@ B.init_lib_dict() ##### END SETUP ########## -if B.targets != ['cudakernels']: - # Put all auto configuration run-time tests here +## Auto-configuration run-time tests + +from FindSharedPtr import FindSharedPtr +from FindUnorderedMap import FindUnorderedMap + +conf = Configure(env) +old_linkflags = conf.env['LINKFLAGS'] +conf.env.Append(LINKFLAGS=env['PLATFORM_LINKFLAGS']) - from FindSharedPtr import FindSharedPtr - from FindUnorderedMap import FindUnorderedMap +# Put all tests here +FindSharedPtr(conf) +FindUnorderedMap(conf) - conf = Configure(env) - old_linkflags = conf.env['LINKFLAGS'] - conf.env.Append(LINKFLAGS=env['PLATFORM_LINKFLAGS']) - FindSharedPtr(conf) - FindUnorderedMap(conf) - conf.env['LINKFLAGS'] = old_linkflags - env = conf.Finish() +conf.env['LINKFLAGS'] = old_linkflags +env = conf.Finish() # End of auto configuration @@ -1015,14 +1028,16 @@ if env['OURPLATFORM']!='darwin': dir=os.path.join(env['BF_INSTALLDIR'], VERSION, 'scripts', 'addons','cycles', 'kernel') source=os.listdir('intern/cycles/kernel') if '__pycache__' in source: source.remove('__pycache__') - source.remove('kernel.cpp') source.remove('CMakeLists.txt') + source.remove('SConscript') source.remove('svm') source.remove('closure') source.remove('geom') source.remove('shaders') source.remove('osl') + source.remove('split') source=['intern/cycles/kernel/'+s for s in source] + source.append('intern/cycles/util/util_atomic.h') source.append('intern/cycles/util/util_color.h') source.append('intern/cycles/util/util_half.h') source.append('intern/cycles/util/util_math.h') @@ -1048,6 +1063,12 @@ if env['OURPLATFORM']!='darwin': if '__pycache__' in source: source.remove('__pycache__') source=['intern/cycles/kernel/geom/'+s for s in source] scriptinstall.append(env.Install(dir=dir,source=source)) + # split + dir=os.path.join(env['BF_INSTALLDIR'], VERSION, 'scripts', 'addons','cycles', 'kernel', 'split') + source=os.listdir('intern/cycles/kernel/split') + if '__pycache__' in source: source.remove('__pycache__') + source=['intern/cycles/kernel/split/'+s for s in source] + scriptinstall.append(env.Install(dir=dir,source=source)) # licenses dir=os.path.join(env['BF_INSTALLDIR'], VERSION, 'scripts', 'addons','cycles', 'license') @@ -1279,6 +1300,15 @@ if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'win64-vc', 'linuxcross'): windlls = env.Install(dir=env['BF_INSTALLDIR'], source = dllsources) allinstall += windlls + # TODO(sergey): For unti we've got better way to deal with python binary + if env['WITH_BF_PYTHON']: + py_target = os.path.join(env['BF_INSTALLDIR'], VERSION, 'python', 'bin') + if env['BF_DEBUG']: + allinstall += env.Install(dir=py_target, source = ['${BF_PYTHON_LIBPATH}/${BF_PYTHON_DLL}_d.dll']) + else: + allinstall += env.Install(dir=py_target, source = ['${BF_PYTHON_LIBPATH}/${BF_PYTHON_DLL}.dll']) + + if env['OURPLATFORM'] == 'win64-mingw': dllsources = [] |