summaryrefslogtreecommitdiff
path: root/src/wscript
blob: 5696a2c478c2824efd5ccf321e050766a876afb8 (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
from waflib import TaskGen

def build(bld):
    if bld.env.STATIC:
        obj = bld(features='cxx cxxstlib')
    else:
        obj = bld(features='cxx cxxshlib')

    obj.name = 'libsub'
    obj.target = 'sub'
    obj.uselib = 'CXML DCP BOOST_FILESYSTEM BOOST_LOCALE'
    obj.export_includes = ['.']
    obj.source = """
                 colour.cc
                 dcp_reader.cc
                 effect.cc
                 frame_time.cc
                 iso6937.cc
                 iso6937_tables.cc
                 metric_time.cc
                 raw_subtitle.cc
                 reader.cc
                 reader_factory.cc
                 stl_binary_reader.cc
                 stl_binary_tables.cc
                 stl_binary_writer.cc
                 stl_text_reader.cc
                 stl_util.cc
                 time_pair.cc
                 subrip_reader.cc
                 subtitle.cc
                 vertical_reference.cc
                 vertical_position.cc
                 """

    headers = """
              collect.h
              colour.h
              dcp_reader.h
              effect.h
              font_size.h
              frame_time.h
              horizontal_position.h
              metric_time.h
              raw_subtitle.h
              reader.h
              stl_binary_tables.h
              stl_binary_reader.h
              stl_binary_writer.h
              stl_text_reader.h
              subrip_reader.h
              subtitle.h
              time_pair.h
              vertical_position.h
              vertical_reference.h
              """

    bld.install_files('${PREFIX}/include/libsub', headers)
    if bld.env.STATIC:
        bld.install_files('${PREFIX}/lib', 'libsub.a')