demos/SConscript
author Radek Brich <radek.brich@devl.cz>
Sun, 31 May 2009 23:06:03 +0200
branchpyrit
changeset 100 c005054bf4c1
parent 97 2a853d284a6a
child 101 50a994a57849
permissions -rw-r--r--
new build target 'vcproj' - generate Visual C++ Studio project files; fix GCC warnings in intersect_packet()
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
60
a23b5089b9c3 moving to SCons build system
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
     1
Import('pymodule')
a23b5089b9c3 moving to SCons build system
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
     2
a23b5089b9c3 moving to SCons build system
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
     3
env = Environment()
a23b5089b9c3 moving to SCons build system
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
     4
env.Append(BUILDERS = {'Copy':Builder(action=Copy('$TARGET','$SOURCE'), single_source=True)})
62
07c2f8084719 more SConscript tweaking, make model preparation work again
Radek Brich <radek.brich@devl.cz>
parents: 60
diff changeset
     5
files = [
07c2f8084719 more SConscript tweaking, make model preparation work again
Radek Brich <radek.brich@devl.cz>
parents: 60
diff changeset
     6
	'boxes.py', 'buddha.py', 'bunny.py', 'car.py', 'dragon.py',
07c2f8084719 more SConscript tweaking, make model preparation work again
Radek Brich <radek.brich@devl.cz>
parents: 60
diff changeset
     7
	'spheres_ao.py', 'spheres_glass.py', 'spheres_shadow.py',
07c2f8084719 more SConscript tweaking, make model preparation work again
Radek Brich <radek.brich@devl.cz>
parents: 60
diff changeset
     8
	'triangles_monkey.py', 'triangles_sphere.py',
72
7c3f38dff082 kd-tree building - check all axes for best split, add additional shape-bbox check
Radek Brich <radek.brich@devl.cz>
parents: 65
diff changeset
     9
	'objreader.py', 'plyreader.py', 'lworeader.py',
97
2a853d284a6a added bench.py demo which prints tree build and render times
Radek Brich <radek.brich@devl.cz>
parents: 96
diff changeset
    10
	'vector.py', 'render_nff.py', 'demo_PIL.py',
2a853d284a6a added bench.py demo which prints tree build and render times
Radek Brich <radek.brich@devl.cz>
parents: 96
diff changeset
    11
	'texture.py', 'bench.py']
60
a23b5089b9c3 moving to SCons build system
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    12
63
440e1ae80459 add many SCons targets (see DEVNOTES)
Radek Brich <radek.brich@devl.cz>
parents: 62
diff changeset
    13
l = []
62
07c2f8084719 more SConscript tweaking, make model preparation work again
Radek Brich <radek.brich@devl.cz>
parents: 60
diff changeset
    14
for file in files:
63
440e1ae80459 add many SCons targets (see DEVNOTES)
Radek Brich <radek.brich@devl.cz>
parents: 62
diff changeset
    15
	l.append( env.Copy('#build/demos/'+file, file) )
60
a23b5089b9c3 moving to SCons build system
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    16
65
242839c6d27d basic detection of compiler (GCC or ICC) and CPU capabilities
Radek Brich <radek.brich@devl.cz>
parents: 63
diff changeset
    17
import os
242839c6d27d basic detection of compiler (GCC or ICC) and CPU capabilities
Radek Brich <radek.brich@devl.cz>
parents: 63
diff changeset
    18
l.append( env.Copy('#build/demos/'+str(pymodule[0]).split(os.sep)[-1], str(pymodule[0])) )
63
440e1ae80459 add many SCons targets (see DEVNOTES)
Radek Brich <radek.brich@devl.cz>
parents: 62
diff changeset
    19
440e1ae80459 add many SCons targets (see DEVNOTES)
Radek Brich <radek.brich@devl.cz>
parents: 62
diff changeset
    20
env.Alias('python-demos', l)
100
c005054bf4c1 new build target 'vcproj' - generate Visual C++ Studio project files; fix GCC warnings in intersect_packet()
Radek Brich <radek.brich@devl.cz>
parents: 97
diff changeset
    21
c005054bf4c1 new build target 'vcproj' - generate Visual C++ Studio project files; fix GCC warnings in intersect_packet()
Radek Brich <radek.brich@devl.cz>
parents: 97
diff changeset
    22
# MS Visual Studio Project
c005054bf4c1 new build target 'vcproj' - generate Visual C++ Studio project files; fix GCC warnings in intersect_packet()
Radek Brich <radek.brich@devl.cz>
parents: 97
diff changeset
    23
vcprojmisc = []
c005054bf4c1 new build target 'vcproj' - generate Visual C++ Studio project files; fix GCC warnings in intersect_packet()
Radek Brich <radek.brich@devl.cz>
parents: 97
diff changeset
    24
for file in files:
c005054bf4c1 new build target 'vcproj' - generate Visual C++ Studio project files; fix GCC warnings in intersect_packet()
Radek Brich <radek.brich@devl.cz>
parents: 97
diff changeset
    25
	vcprojmisc += ['demos/' + file]
c005054bf4c1 new build target 'vcproj' - generate Visual C++ Studio project files; fix GCC warnings in intersect_packet()
Radek Brich <radek.brich@devl.cz>
parents: 97
diff changeset
    26
vcproj = env.MSVSProject(
c005054bf4c1 new build target 'vcproj' - generate Visual C++ Studio project files; fix GCC warnings in intersect_packet()
Radek Brich <radek.brich@devl.cz>
parents: 97
diff changeset
    27
	auto_build_solution=0,
c005054bf4c1 new build target 'vcproj' - generate Visual C++ Studio project files; fix GCC warnings in intersect_packet()
Radek Brich <radek.brich@devl.cz>
parents: 97
diff changeset
    28
	target = '#pyrit_demos' + env['MSVSPROJECTSUFFIX'],
c005054bf4c1 new build target 'vcproj' - generate Visual C++ Studio project files; fix GCC warnings in intersect_packet()
Radek Brich <radek.brich@devl.cz>
parents: 97
diff changeset
    29
	misc = vcprojmisc,
c005054bf4c1 new build target 'vcproj' - generate Visual C++ Studio project files; fix GCC warnings in intersect_packet()
Radek Brich <radek.brich@devl.cz>
parents: 97
diff changeset
    30
	buildtarget = 'python-demos',
c005054bf4c1 new build target 'vcproj' - generate Visual C++ Studio project files; fix GCC warnings in intersect_packet()
Radek Brich <radek.brich@devl.cz>
parents: 97
diff changeset
    31
	variant = 'Release')
c005054bf4c1 new build target 'vcproj' - generate Visual C++ Studio project files; fix GCC warnings in intersect_packet()
Radek Brich <radek.brich@devl.cz>
parents: 97
diff changeset
    32
c005054bf4c1 new build target 'vcproj' - generate Visual C++ Studio project files; fix GCC warnings in intersect_packet()
Radek Brich <radek.brich@devl.cz>
parents: 97
diff changeset
    33
Return('vcproj')