WIP: SCC support.
[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 BOOST_FILESYSTEM BOOST_LOCALE BOOST_REGEX'
12     obj.export_includes = ['.']
13     obj.source = """
14                  colour.cc
15                  effect.cc
16                  exceptions.cc
17                  font_size.cc
18                  horizontal_position.cc
19                  iso6937.cc
20                  iso6937_tables.cc
21                  locale_convert.cc
22                  rational.cc
23                  raw_convert.cc
24                  raw_subtitle.cc
25                  reader.cc
26                  reader_factory.cc
27                  scc_reader.cc
28                  ssa_reader.cc
29                  stl_binary_reader.cc
30                  stl_binary_tables.cc
31                  stl_binary_writer.cc
32                  stl_text_reader.cc
33                  stl_util.cc
34                  sub_time.cc
35                  subrip_reader.cc
36                  subtitle.cc
37                  util.cc
38                  vertical_reference.cc
39                  vertical_position.cc
40                  web_vtt_reader.cc
41                  """
42
43     headers = """
44               collect.h
45               colour.h
46               effect.h
47               exceptions.h
48               font_size.h
49               horizontal_position.h
50               horizontal_reference.h
51               rational.h
52               raw_subtitle.h
53               reader.h
54               reader_factory.h
55               scc_reader.h
56               ssa_reader.h
57               stl_binary_tables.h
58               stl_binary_reader.h
59               stl_binary_writer.h
60               stl_text_reader.h
61               sub_time.h
62               subrip_reader.h
63               subtitle.h
64               vertical_position.h
65               vertical_reference.h
66               web_vtt_reader.h
67               """
68
69     bld.install_files('${PREFIX}/include/libsub%s/sub' % bld.env.API_VERSION, headers)
70     if bld.env.STATIC:
71         bld.install_files('${PREFIX}/lib', 'libsub%s.a' % bld.env.API_VERSION)