Replace DCP parser with basic version that uses libdcp.
[libsub.git] / src / wscript
1 from waflib import TaskGen
2
3 def build(bld):
4     if bld.env.STATIC:
5         obj = bld(features='cxx cxxstlib')
6     else:
7         obj = bld(features='cxx cxxshlib')
8
9     obj.name = 'libsub%s' % bld.env.API_VERSION
10     obj.target = 'sub%s' % bld.env.API_VERSION
11     obj.uselib = 'CXML DCP BOOST_FILESYSTEM BOOST_LOCALE BOOST_REGEX ASDCPLIB_CTH'
12     obj.use = 'libkumu-libsub%s libasdcp-libsub%s' % (bld.env.API_VERSION, bld.env.API_VERSION)
13     obj.export_includes = ['.']
14     obj.source = """
15                  colour.cc
16                  dcp_reader.cc
17                  effect.cc
18                  exceptions.cc
19                  font_size.cc
20                  iso6937.cc
21                  iso6937_tables.cc
22                  rational.cc
23                  raw_subtitle.cc
24                  reader.cc
25                  reader_factory.cc
26                  ssa_reader.cc
27                  stl_binary_reader.cc
28                  stl_binary_tables.cc
29                  stl_binary_writer.cc
30                  stl_text_reader.cc
31                  stl_util.cc
32                  sub_time.cc
33                  subrip_reader.cc
34                  subtitle.cc
35                  util.cc
36                  vertical_reference.cc
37                  vertical_position.cc
38                  """
39
40     headers = """
41               collect.h
42               colour.h
43               dcp_reader.h
44               effect.h
45               exceptions.h
46               font_size.h
47               rational.h
48               raw_subtitle.h
49               reader.h
50               ssa_reader.h
51               stl_binary_tables.h
52               stl_binary_reader.h
53               stl_binary_writer.h
54               stl_text_reader.h
55               sub_time.h
56               subrip_reader.h
57               subtitle.h
58               vertical_position.h
59               vertical_reference.h
60               """
61
62     bld.install_files('${PREFIX}/include/libsub%s/sub' % bld.env.API_VERSION, headers)
63     if bld.env.STATIC:
64         bld.install_files('${PREFIX}/lib', 'libsub%s.a' % bld.env.API_VERSION)