Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/ARToolKitPlus/SConstruct
blob: f8732b48ebdc44d206280b413914396f54526094 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
#!/bin/env python

from os.path import abspath

build_optional_flags = []

vars  = Variables()

vars.AddVariables(
    PathVariable('prefix',
                 'Installation prefix',
                 '/usr/local', PathVariable.PathAccept),
    PathVariable('exec_prefix',
                 'Installation prefix for executables and object code libraries',
                 '$prefix', PathVariable.PathAccept),
    PathVariable('bindir',
                 'Installation prefix for user executables',
                 '$exec_prefix/bin', PathVariable.PathAccept),
    PathVariable('datadir',
               'Installation prefix for machine-independent data',
               '$prefix/share', PathVariable.PathAccept),
    PathVariable('imagepath',
               'Installation path for the default binary image',
               '$rootdir/default.sim', PathVariable.PathAccept),
    PathVariable('docdir',
               'Installation prefix for documentation',
               '$datadir/doc', PathVariable.PathAccept),
    PathVariable('libdir',
                 'Installation prefix for object code libraries',
                 '$exec_prefix/lib', PathVariable.PathAccept),
    PathVariable('includedir',
                 'Installation prefix for C++ header files',
                 '$prefix/include/ARToolKitPlus', PathVariable.PathAccept))

vars.Add('CPPPATH',
         'Directories that the C++ preprocessor will search for '
         'include directories. List only directories, do not list '
         'options flags like -I in gcc. Multiples directories must be '
         'quoted and delimited by a semicolon',
         '')

vars.Add('LIBPATH',
         'The list of directories that will be searched for libraries. '
         'List only directories, do not list options flags like -L in '
         'gcc. Multiples directories must be quoted and delimited by '
         'a semicolon',
         '')

vars.Add('CPPFLAGS',
         'C++ preprocessor flags',
         '')

vars.Add('CXX',
         'The C++ compiler',
         'g++')

env = Environment(variables  = vars,
                  CPPFLAGS = '${CPPFLAGS}')

env['CPPPATH'] = env['CPPPATH'].split(';')
env.Append(CPPPATH = [abspath('./include')])

env['LIBPATH'] = env['LIBPATH'].split(';')

Help(vars.GenerateHelpText(env))

install_nodes = []

Export('env', 'install_nodes')

SConscript(['src/SConscript', 'tools/IdPatGen/SConscript',
            'sample/multi/SConscript', 'sample/simple/SConscript'])

install_nodes.append(env.Install(env['includedir'],
                                 Glob('include/ARToolKitPlus/*.h')))

install_nodes.append(env.Install(env['includedir'] + '/extra',
                                 Glob('include/ARToolKitPlus/extra/*.h') +
                                 Glob('include/ARToolKitPlus/extra/*.txt') +
                                 Glob('include/ARToolKitPlus/extra/*.cxx') +
                                 Glob('include/ARToolKitPlus/extra/*.cpp')))

for directory in ['src', 'src/core', 'src/extra', 'src/librpp',
                  'src/librpp/MATLAB', 'src/math']:
    install_nodes.append(env.Install(env['includedir'] + '/' + directory,
                                     Glob(directory + '/*.h') +
                                     Glob(directory + '/*.hxx') +
                                     Glob(directory + '/*.m') +
                                     Glob(directory + '/*.txt') +
                                     Glob(directory + '/*.cxx') +
                                     Glob(directory + '/*.cpp')))

install_nodes.append(env.Install(env['docdir'] + '/ARToolKitPlus',
                                 'doc/ART02-Tutorial.pdf'))

install_nodes.append(env.Install(env['datadir'] + '/ARToolKitPlus/simple/data',
                                 [Glob('sample/simple/data/*.dat'),
                                  Glob('sample/simple/data/*.cal'),
                                  Glob('sample/simple/data/*.raw'),
                                  Glob('sample/simple/data/*.jpg')]))

install_nodes.append(env.Install(env['datadir'] + '/ARToolKitPlus/multi/data',
                                 [Glob('sample/multi/data/*.dat'),
                                  Glob('sample/multi/data/*.cal'),
                                  Glob('sample/multi/data/*.raw'),
                                  Glob('sample/multi/data/*.jpg')]))

env.Alias('install', install_nodes)