diff options
Diffstat (limited to 'SConstruct')
-rw-r--r-- | SConstruct | 45 |
1 files changed, 23 insertions, 22 deletions
diff --git a/SConstruct b/SConstruct index 49e899c3d20..3b1be71aebd 100644 --- a/SConstruct +++ b/SConstruct @@ -746,29 +746,30 @@ if env['OURPLATFORM']!='darwin': source=['intern/cycles/doc/license/'+s for s in source] scriptinstall.append(env.Install(dir=dir,source=source)) - # cuda binaries - if env['WITH_BF_CYCLES_CUDA_BINARIES']: - dir=os.path.join(env['BF_INSTALLDIR'], VERSION, 'scripts', 'addons','cycles', 'lib') - for arch in env['BF_CYCLES_CUDA_BINARIES_ARCH']: - kernel_build_dir = os.path.join(B.root_build_dir, 'intern/cycles/kernel') - cubin_file = os.path.join(kernel_build_dir, "kernel_%s.cubin" % arch) - cubininstall.append(env.Install(dir=dir,source=cubin_file)) - - # osl shaders - if env['WITH_BF_CYCLES_OSL']: - dir=os.path.join(env['BF_INSTALLDIR'], VERSION, 'scripts', 'addons','cycles', 'shader') - - osl_source_dir = Dir('./intern/cycles/kernel/shaders').srcnode().path - oso_build_dir = os.path.join(B.root_build_dir, 'intern/cycles/kernel/shaders') - - headers='node_color.h node_fresnel.h node_texture.h oslutil.h stdosl.h'.split() - source=['intern/cycles/kernel/shaders/'+s for s in headers] - scriptinstall.append(env.Install(dir=dir,source=source)) + if env['WITH_BF_CYCLES']: + # cuda binaries + if env['WITH_BF_CYCLES_CUDA_BINARIES']: + dir=os.path.join(env['BF_INSTALLDIR'], VERSION, 'scripts', 'addons','cycles', 'lib') + for arch in env['BF_CYCLES_CUDA_BINARIES_ARCH']: + kernel_build_dir = os.path.join(B.root_build_dir, 'intern/cycles/kernel') + cubin_file = os.path.join(kernel_build_dir, "kernel_%s.cubin" % arch) + cubininstall.append(env.Install(dir=dir,source=cubin_file)) + + # osl shaders + if env['WITH_BF_CYCLES_OSL']: + dir=os.path.join(env['BF_INSTALLDIR'], VERSION, 'scripts', 'addons','cycles', 'shader') + + osl_source_dir = Dir('./intern/cycles/kernel/shaders').srcnode().path + oso_build_dir = os.path.join(B.root_build_dir, 'intern/cycles/kernel/shaders') + + headers='node_color.h node_fresnel.h node_texture.h oslutil.h stdosl.h'.split() + source=['intern/cycles/kernel/shaders/'+s for s in headers] + scriptinstall.append(env.Install(dir=dir,source=source)) - for f in os.listdir(osl_source_dir): - if f.endswith('.osl'): - oso_file = os.path.join(oso_build_dir, f.replace('.osl', '.oso')) - scriptinstall.append(env.Install(dir=dir,source=oso_file)) + for f in os.listdir(osl_source_dir): + if f.endswith('.osl'): + oso_file = os.path.join(oso_build_dir, f.replace('.osl', '.oso')) + scriptinstall.append(env.Install(dir=dir,source=oso_file)) if env['WITH_BF_OCIO']: colormanagement = os.path.join('release', 'datafiles', 'colormanagement') |