Use out-of-tree asdcplib-cth
[libdcp.git] / cscript
1 import os
2
3 def dependencies(target):
4     return (('libcxml', 'v0.15.0'), ('openjpeg2-cdist', '63c1932'), ('asdcplib-cth', None))
5
6 def build(target, options):
7     cmd = './waf configure --disable-examples --prefix=%s' % target.directory
8     if target.platform == 'linux':
9         cmd += ' --static'
10         if target.distro == 'centos':
11             cmd += ' --disable-tests'
12         if (target.distro == 'debian' and target.version == 'unstable' or target.distro == 'fedora' and target.version == '23'):
13             target.append_with_space('CXXFLAGS', '-std=c++11')
14     elif target.platform == 'windows':
15         cmd += ' --target-windows --disable-gcov'
16     elif target.platform == 'osx':
17         cmd += ' --disable-tests'
18
19     if target.debug:
20         cmd += ' --enable-debug'
21
22     target.command(cmd)
23     target.command('./waf build install')
24
25 def make_doxygen(target):
26     os.makedirs('build/doc')
27     target.command('doxygen')
28     return os.path.abspath('build/doc/html')
29
30 def test(target):
31     if target.platform != 'windows':
32         target.set('LC_ALL', 'C')
33         target.command('run/tests')