demos/SConscript
author Radek Brich <radek.brich@devl.cz>
Wed, 19 Aug 2009 09:18:29 +0200
branchpyrit
changeset 101 50a994a57849
parent 100 c005054bf4c1
child 104 2274a07510c1
permissions -rw-r--r--
vcproj build target only for cc=msvc, fix sdl-config

Import('pymodule cc')

env = Environment()
env.Append(BUILDERS = {'Copy':Builder(action=Copy('$TARGET','$SOURCE'), single_source=True)})
files = [
	'boxes.py', 'buddha.py', 'bunny.py', 'car.py', 'dragon.py',
	'spheres_ao.py', 'spheres_glass.py', 'spheres_shadow.py',
	'triangles_monkey.py', 'triangles_sphere.py',
	'objreader.py', 'plyreader.py', 'lworeader.py',
	'vector.py', 'render_nff.py', 'demo_PIL.py',
	'texture.py', 'bench.py']

l = []
for file in files:
	l.append( env.Copy('#build/demos/'+file, file) )

import os
l.append( env.Copy('#build/demos/'+str(pymodule[0]).split(os.sep)[-1], str(pymodule[0])) )

env.Alias('python-demos', l)

if cc == 'msvc':
	# MS Visual Studio Project
	vcprojmisc = []
	for file in files:
		vcprojmisc += ['demos/' + file]
	vcproj = env.MSVSProject(
		auto_build_solution=0,
		target = '#pyrit_demos' + env['MSVSPROJECTSUFFIX'],
		misc = vcprojmisc,
		buildtarget = 'python-demos',
		variant = 'Release')

	Return('vcproj')