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:
Diffstat (limited to 'SConstruct')
-rw-r--r--SConstruct90
1 files changed, 78 insertions, 12 deletions
diff --git a/SConstruct b/SConstruct
index 29e22cb32a7..08a03205c35 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')
@@ -480,6 +488,13 @@ if env['WITH_BF_OPENMP'] == 1:
else:
env.Append(CCFLAGS=['-fopenmp'])
+if env['WITH_BF_CPP11']:
+ if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
+ # Nothing special is needed, C++11 features are available by default.
+ pass
+ else:
+ env['CXXFLAGS'].append('-std=c++11')
+
#check for additional debug libnames
if env.has_key('BF_DEBUG_LIBS'):
@@ -751,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")
@@ -764,6 +782,9 @@ if B.targets != ['cudakernels']:
data_to_c_simple("source/blender/gpu/shaders/gpu_shader_fx_ssao_frag.glsl")
data_to_c_simple("source/blender/gpu/shaders/gpu_shader_fx_dof_frag.glsl")
data_to_c_simple("source/blender/gpu/shaders/gpu_shader_fx_dof_vert.glsl")
+ data_to_c_simple("source/blender/gpu/shaders/gpu_shader_fx_dof_hq_frag.glsl")
+ data_to_c_simple("source/blender/gpu/shaders/gpu_shader_fx_dof_hq_vert.glsl")
+ data_to_c_simple("source/blender/gpu/shaders/gpu_shader_fx_dof_hq_geo.glsl")
data_to_c_simple("source/blender/gpu/shaders/gpu_shader_fx_lib.glsl")
data_to_c_simple("source/blender/gpu/shaders/gpu_shader_fx_depth_resolve.glsl")
data_to_c_simple("source/blender/gpu/shaders/gpu_shader_fx_vert.glsl")
@@ -796,6 +817,13 @@ if B.targets != ['cudakernels']:
data_to_c_simple("release/datafiles/brushicons/fill.png")
data_to_c_simple("release/datafiles/brushicons/flatten.png")
data_to_c_simple("release/datafiles/brushicons/grab.png")
+ data_to_c_simple("release/datafiles/brushicons/hairadd.png")
+ data_to_c_simple("release/datafiles/brushicons/haircomb.png")
+ data_to_c_simple("release/datafiles/brushicons/haircut.png")
+ data_to_c_simple("release/datafiles/brushicons/hairlength.png")
+ data_to_c_simple("release/datafiles/brushicons/hairpuff.png")
+ data_to_c_simple("release/datafiles/brushicons/hairsmooth.png")
+ data_to_c_simple("release/datafiles/brushicons/hairweight.png")
data_to_c_simple("release/datafiles/brushicons/inflate.png")
data_to_c_simple("release/datafiles/brushicons/layer.png")
data_to_c_simple("release/datafiles/brushicons/lighten.png")
@@ -861,19 +889,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
- from FindSharedPtr import FindSharedPtr
- from FindUnorderedMap import FindUnorderedMap
+conf = Configure(env)
+old_linkflags = conf.env['LINKFLAGS']
+conf.env.Append(LINKFLAGS=env['PLATFORM_LINKFLAGS'])
- 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()
+# Put all tests here
+FindSharedPtr(conf)
+FindUnorderedMap(conf)
+
+conf.env['LINKFLAGS'] = old_linkflags
+env = conf.Finish()
# End of auto configuration
@@ -1005,14 +1035,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')
@@ -1038,6 +1070,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')
@@ -1167,9 +1205,37 @@ if env['OURPLATFORM']=='linuxcross':
textlist = []
texttargetlist = []
for tp, tn, tf in os.walk('release/text'):
+ tf.remove("readme.html")
for f in tf:
textlist.append(tp+os.sep+f)
+def readme_version_patch():
+ readme_src = "release/text/readme.html"
+ readme_dst = os.path.abspath(os.path.normpath(os.path.join(env['BF_BUILDDIR'], "readme.html")))
+
+ if not os.path.exists(readme_dst) or (os.path.getmtime(readme_dst) < os.path.getmtime(readme_src)):
+ f = open(readme_src, "r")
+ data = f.read()
+ f.close()
+
+ data = data.replace("BLENDER_VERSION", VERSION)
+ f = open(readme_dst, "w")
+ f.write(data)
+ f.close()
+
+ textlist.append(readme_dst)
+
+readme_version_patch()
+del readme_version_patch
+
+
+'''Command(
+ "release/text/readme.html"
+
+ )
+Command("file.out", "file.in", Copy(env['BF_INSTALLDIR'], "release/text/readme.html"))
+'''
+
# Font licenses
textlist.append('release/datafiles/LICENSE-bfont.ttf.txt')
if env['WITH_BF_INTERNATIONAL']: