updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / artoolkitplus / SConstruct
blobf8732b48ebdc44d206280b413914396f54526094
1 #!/bin/env python
3 from os.path import abspath
5 build_optional_flags = []
7 vars = Variables()
9 vars.AddVariables(
10 PathVariable('prefix',
11 'Installation prefix',
12 '/usr/local', PathVariable.PathAccept),
13 PathVariable('exec_prefix',
14 'Installation prefix for executables and object code libraries',
15 '$prefix', PathVariable.PathAccept),
16 PathVariable('bindir',
17 'Installation prefix for user executables',
18 '$exec_prefix/bin', PathVariable.PathAccept),
19 PathVariable('datadir',
20 'Installation prefix for machine-independent data',
21 '$prefix/share', PathVariable.PathAccept),
22 PathVariable('imagepath',
23 'Installation path for the default binary image',
24 '$rootdir/default.sim', PathVariable.PathAccept),
25 PathVariable('docdir',
26 'Installation prefix for documentation',
27 '$datadir/doc', PathVariable.PathAccept),
28 PathVariable('libdir',
29 'Installation prefix for object code libraries',
30 '$exec_prefix/lib', PathVariable.PathAccept),
31 PathVariable('includedir',
32 'Installation prefix for C++ header files',
33 '$prefix/include/ARToolKitPlus', PathVariable.PathAccept))
35 vars.Add('CPPPATH',
36 'Directories that the C++ preprocessor will search for '
37 'include directories. List only directories, do not list '
38 'options flags like -I in gcc. Multiples directories must be '
39 'quoted and delimited by a semicolon',
40 '')
42 vars.Add('LIBPATH',
43 'The list of directories that will be searched for libraries. '
44 'List only directories, do not list options flags like -L in '
45 'gcc. Multiples directories must be quoted and delimited by '
46 'a semicolon',
47 '')
49 vars.Add('CPPFLAGS',
50 'C++ preprocessor flags',
51 '')
53 vars.Add('CXX',
54 'The C++ compiler',
55 'g++')
57 env = Environment(variables = vars,
58 CPPFLAGS = '${CPPFLAGS}')
60 env['CPPPATH'] = env['CPPPATH'].split(';')
61 env.Append(CPPPATH = [abspath('./include')])
63 env['LIBPATH'] = env['LIBPATH'].split(';')
65 Help(vars.GenerateHelpText(env))
67 install_nodes = []
69 Export('env', 'install_nodes')
71 SConscript(['src/SConscript', 'tools/IdPatGen/SConscript',
72 'sample/multi/SConscript', 'sample/simple/SConscript'])
74 install_nodes.append(env.Install(env['includedir'],
75 Glob('include/ARToolKitPlus/*.h')))
77 install_nodes.append(env.Install(env['includedir'] + '/extra',
78 Glob('include/ARToolKitPlus/extra/*.h') +
79 Glob('include/ARToolKitPlus/extra/*.txt') +
80 Glob('include/ARToolKitPlus/extra/*.cxx') +
81 Glob('include/ARToolKitPlus/extra/*.cpp')))
83 for directory in ['src', 'src/core', 'src/extra', 'src/librpp',
84 'src/librpp/MATLAB', 'src/math']:
85 install_nodes.append(env.Install(env['includedir'] + '/' + directory,
86 Glob(directory + '/*.h') +
87 Glob(directory + '/*.hxx') +
88 Glob(directory + '/*.m') +
89 Glob(directory + '/*.txt') +
90 Glob(directory + '/*.cxx') +
91 Glob(directory + '/*.cpp')))
93 install_nodes.append(env.Install(env['docdir'] + '/ARToolKitPlus',
94 'doc/ART02-Tutorial.pdf'))
96 install_nodes.append(env.Install(env['datadir'] + '/ARToolKitPlus/simple/data',
97 [Glob('sample/simple/data/*.dat'),
98 Glob('sample/simple/data/*.cal'),
99 Glob('sample/simple/data/*.raw'),
100 Glob('sample/simple/data/*.jpg')]))
102 install_nodes.append(env.Install(env['datadir'] + '/ARToolKitPlus/multi/data',
103 [Glob('sample/multi/data/*.dat'),
104 Glob('sample/multi/data/*.cal'),
105 Glob('sample/multi/data/*.raw'),
106 Glob('sample/multi/data/*.jpg')]))
108 env.Alias('install', install_nodes)