Fix header install list.
[libdcp.git] / src / wscript
1 from waflib import TaskGen
2
3 def build(bld):
4     source = """
5              asset.cc
6              certificate_chain.cc
7              certificates.cc
8              colour_conversion.cc
9              colour_matrix.cc
10              content.cc
11              cpl.cc
12              dcp.cc        
13              dcp_time.cc
14              decrypted_kdm.cc
15              decrypted_kdm_key.cc
16              encrypted_kdm.cc
17              exceptions.cc
18              file.cc
19              font.cc
20              font_node.cc
21              gamma_transfer_function.cc
22              interop_load_font_node.cc
23              interop_subtitle_content.cc
24              key.cc
25              local_time.cc
26              metadata.cc
27              modified_gamma_transfer_function.cc
28              mono_picture_mxf.cc
29              mono_picture_mxf_writer.cc
30              mono_picture_frame.cc
31              mxf.cc
32              mxf_writer.cc
33              object.cc
34              picture_mxf.cc
35              picture_mxf_writer.cc
36              reel.cc
37              reel_asset.cc
38              reel_mono_picture_asset.cc
39              reel_mxf_asset.cc
40              reel_picture_asset.cc
41              reel_sound_asset.cc
42              reel_stereo_picture_asset.cc
43              reel_subtitle_asset.cc
44              rgb_xyz.cc
45              signer.cc
46              smpte_load_font_node.cc
47              smpte_subtitle_content.cc
48              sound_mxf.cc
49              sound_mxf_writer.cc
50              sound_frame.cc
51              stereo_picture_mxf.cc
52              stereo_picture_mxf_writer.cc
53              stereo_picture_frame.cc
54              subtitle_node.cc
55              subtitle_content.cc
56              subtitle_string.cc
57              text_node.cc
58              transfer_function.cc
59              types.cc
60              util.cc
61              version.cc
62              xyz_image.cc
63              """
64
65     headers = """
66               asset.h
67               certificate_chain.h
68               certificates.h
69               chromaticity.h
70               colour_conversion.h
71               colour_matrix.h
72               cpl.h
73               content.h
74               dcp.h
75               dcp_time.h
76               decrypted_kdm.h
77               decrypted_kdm_key.h
78               encrypted_kdm.h
79               exceptions.h
80               font.h
81               gamma_transfer_function.h
82               interop_load_font_node.h
83               interop_subtitle_content.h
84               key.h
85               load_font_node.h
86               local_time.h
87               metadata.h
88               mono_picture_mxf.h
89               mono_picture_frame.h
90               modified_gamma_transfer_function.h
91               mxf.h
92               mxf_writer.h
93               object.h
94               picture_mxf.h
95               picture_mxf_writer.h
96               raw_convert.h
97               rgb_xyz.h
98               reel.h
99               reel_asset.h
100               reel_mono_picture_asset.h
101               reel_mxf_asset.h
102               reel_picture_asset.h
103               reel_sound_asset.h
104               reel_stereo_picture_asset.h
105               reel_subtitle_asset.h
106               ref.h
107               signer.h
108               smpte_load_font_node.h
109               smpte_subtitle_content.h
110               sound_frame.h
111               sound_mxf.h
112               sound_mxf_writer.h
113               stereo_picture_mxf.h
114               stereo_picture_frame.h
115               subtitle_node.h
116               subtitle_content.h
117               subtitle_string.h
118               transfer_function.h
119               types.h
120               util.h
121               version.h
122               xyz_image.h
123               """
124
125     # Main library
126     if bld.env.STATIC:
127         obj = bld(features='cxx cxxstlib')
128     else:
129         obj = bld(features='cxx cxxshlib')
130     obj.name = 'libdcp%s' % bld.env.API_VERSION
131     obj.target = 'dcp%s' % bld.env.API_VERSION
132     obj.export_includes = ['.']
133     obj.uselib = 'BOOST_FILESYSTEM BOOST_SIGNALS2 BOOST_DATETIME OPENSSL SIGC++ LIBXML++ OPENJPEG CXML XMLSEC1'
134     obj.use = 'libkumu-libdcp%s libasdcp-libdcp%s' % (bld.env.API_VERSION, bld.env.API_VERSION)
135     obj.source = source
136
137     # Library for gcov
138     if bld.is_defined('HAVE_GCOV'):
139         obj = bld(features='cxx cxxstlib')
140         obj.name = 'libdcp%s_gcov' % bld.env.API_VERSION
141         obj.target = 'dcp%s_gcov' % bld.env.API_VERSION
142         obj.export_includes = ['.']
143         obj.uselib = 'BOOST_FILESYSTEM BOOST_SIGNALS2 BOOST_DATETIME OPENSSL SIGC++ LIBXML++ OPENJPEG CXML XMLSEC1'
144         obj.use = 'libkumu-libdcp%s libasdcp-libdcp%s' % (bld.env.API_VERSION, bld.env.API_VERSION)
145         obj.source = source
146         obj.cppflags = ['-fprofile-arcs', '-ftest-coverage', '-fno-inline', '-fno-default-inline', '-fno-elide-constructors', '-g', '-O0']
147
148     bld.install_files('${PREFIX}/include/libdcp%s/dcp' % bld.env.API_VERSION, headers)
149     if bld.env.STATIC:
150         bld.install_files('${PREFIX}/lib', 'libdcp%s.a' % bld.env.API_VERSION)