Move FrameInfo into its own file.
[libdcp.git] / src / wscript
1 #
2 #    Copyright (C) 2012-2020 Carl Hetherington <cth@carlh.net>
3 #
4 #    This program is free software; you can redistribute it and/or modify
5 #    it under the terms of the GNU General Public License as published by
6 #    the Free Software Foundation; either version 2 of the License, or
7 #    (at your option) any later version.
8 #
9 #    This program is distributed in the hope that it will be useful,
10 #    but WITHOUT ANY WARRANTY; without even the implied warranty of
11 #    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 #    GNU General Public License for more details.
13 #
14 #    You should have received a copy of the GNU General Public License
15 #    along with this program; if not, write to the Free Software
16 #    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17 #
18 #    In addition, as a special exception, the copyright holders give
19 #    permission to link the code of portions of this program with the
20 #    OpenSSL library under certain conditions as described in each
21 #    individual source file, and distribute linked combinations
22 #    including the two.
23 #
24 #    You must obey the GNU General Public License in all respects
25 #    for all of the code used other than OpenSSL.  If you modify
26 #    file(s) with this exception, you may extend this exception to your
27 #    version of the file(s), but you are not obligated to do so.  If you
28 #    do not wish to do so, delete this exception statement from your
29 #    version.  If you delete this exception statement from all source
30 #    files in the program, then also delete it here.
31 #
32
33 from waflib import TaskGen
34
35 def build(bld):
36     source = """
37              array_data.cc
38              asset.cc
39              asset_factory.cc
40              asset_map.cc
41              asset_writer.cc
42              atmos_asset.cc
43              atmos_asset_writer.cc
44              bitstream.cc
45              certificate.cc
46              certificate_chain.cc
47              chromaticity.cc
48              colour_conversion.cc
49              combine.cc
50              content_kind.cc
51              cpl.cc
52              data.cc
53              dcp.cc
54              dcp_time.cc
55              decrypted_kdm.cc
56              decrypted_kdm_key.cc
57              encrypted_kdm.cc
58              exceptions.cc
59              file.cc
60              filesystem.cc
61              font_asset.cc
62              fsk.cc
63              gamma_transfer_function.cc
64              h_align.cc
65              identity_transfer_function.cc
66              interop_load_font_node.cc
67              interop_subtitle_asset.cc
68              j2k_picture_asset.cc
69              j2k_picture_asset_writer.cc
70              j2k_transcode.cc
71              key.cc
72              language_tag.cc
73              local_time.cc
74              locale_convert.cc
75              metadata.cc
76              modified_gamma_transfer_function.cc
77              mono_j2k_picture_asset.cc
78              mono_j2k_picture_asset_writer.cc
79              mono_j2k_picture_frame.cc
80              mxf.cc
81              name_format.cc
82              object.cc
83              openjpeg_image.cc
84              picture_asset.cc
85              pkl.cc
86              rating.cc
87              raw_convert.cc
88              reel.cc
89              reel_asset.cc
90              reel_atmos_asset.cc
91              reel_closed_caption_asset.cc
92              reel_file_asset.cc
93              reel_interop_closed_caption_asset.cc
94              reel_interop_subtitle_asset.cc
95              reel_markers_asset.cc
96              reel_mono_picture_asset.cc
97              reel_picture_asset.cc
98              reel_smpte_closed_caption_asset.cc
99              reel_smpte_subtitle_asset.cc
100              reel_sound_asset.cc
101              reel_stereo_picture_asset.cc
102              reel_subtitle_asset.cc
103              ref.cc
104              rgb_xyz.cc
105              ruby.cc
106              s_gamut3_transfer_function.cc
107              search.cc
108              smpte_load_font_node.cc
109              smpte_subtitle_asset.cc
110              sound_asset.cc
111              sound_asset_writer.cc
112              sound_frame.cc
113              stereo_j2k_picture_asset.cc
114              stereo_j2k_picture_asset_writer.cc
115              stereo_j2k_picture_frame.cc
116              subtitle.cc
117              subtitle_asset.cc
118              subtitle_asset_internal.cc
119              subtitle_image.cc
120              subtitle_standard.cc
121              subtitle_string.cc
122              transfer_function.cc
123              types.cc
124              utc_offset.cc
125              util.cc
126              v_align.cc
127              verify.cc
128              verify_j2k.cc
129              verify_report.cc
130              version.cc
131              """
132
133     headers = """
134               array_data.h
135               asset.h
136               asset_list.h
137               asset_map.h
138               asset_reader.h
139               asset_writer.h
140               atmos_asset.h
141               atmos_asset_reader.h
142               atmos_asset_writer.h
143               atmos_frame.h
144               behaviour.h
145               certificate.h
146               certificate_chain.h
147               chromaticity.h
148               colour_conversion.h
149               combine.h
150               compose.hpp
151               content_kind.h
152               cpl.h
153               crypto_context.h
154               data.h
155               dcp.h
156               dcp_assert.h
157               dcp_time.h
158               decrypted_kdm.h
159               decrypted_kdm_key.h
160               encrypted_kdm.h
161               equality_options.h
162               exceptions.h
163               file.h
164               filesystem.h
165               font_asset.h
166               frame.h
167               frame_info.h
168               fsk.h
169               gamma_transfer_function.h
170               h_align.h
171               identity_transfer_function.h
172               interop_load_font_node.h
173               interop_subtitle_asset.h
174               j2k_picture_asset.h
175               j2k_picture_asset_writer.h
176               j2k_transcode.h
177               key.h
178               language_tag.h
179               load_font_node.h
180               local_time.h
181               locale_convert.h
182               metadata.h
183               modified_gamma_transfer_function.h
184               mono_j2k_picture_asset.h
185               mono_j2k_picture_asset_reader.h
186               mono_j2k_picture_asset_writer.h
187               mono_j2k_picture_frame.h
188               mxf.h
189               name_format.h
190               object.h
191               openjpeg_image.h
192               picture_asset.h
193               piecewise_lut.h
194               pkl.h
195               rating.h
196               raw_convert.h
197               reel.h
198               reel_asset.h
199               reel_atmos_asset.h
200               reel_closed_caption_asset.h
201               reel_file_asset.h
202               reel_interop_closed_caption_asset.h
203               reel_interop_subtitle_asset.h
204               reel_markers_asset.h
205               reel_mono_picture_asset.h
206               reel_picture_asset.h
207               reel_smpte_closed_caption_asset.h
208               reel_smpte_subtitle_asset.h
209               reel_sound_asset.h
210               reel_stereo_picture_asset.h
211               reel_subtitle_asset.h
212               ref.h
213               rgb_xyz.h
214               ruby.h
215               s_gamut3_transfer_function.h
216               scope_guard.h
217               search.h
218               smpte_load_font_node.h
219               smpte_subtitle_asset.h
220               sound_asset.h
221               sound_asset_reader.h
222               sound_asset_writer.h
223               sound_frame.h
224               stereo_j2k_picture_asset.h
225               stereo_j2k_picture_asset_reader.h
226               stereo_j2k_picture_asset_writer.h
227               stereo_j2k_picture_frame.h
228               subtitle.h
229               subtitle_asset.h
230               subtitle_image.h
231               subtitle_standard.h
232               subtitle_string.h
233               transfer_function.h
234               types.h
235               utc_offset.h
236               util.h
237               v_align.h
238               verify.h
239               verify_j2k.h
240               verify_report.h
241               version.h
242               warnings.h
243               """
244
245     # Main library
246     if bld.env.STATIC:
247         obj = bld(features='cxx cxxstlib')
248     else:
249         obj = bld(features='cxx cxxshlib')
250     obj.name = 'libdcp%s' % bld.env.API_VERSION
251     obj.target = 'dcp%s' % bld.env.API_VERSION
252     obj.export_includes = ['.']
253     obj.uselib = 'BOOST_FILESYSTEM BOOST_SIGNALS2 BOOST_DATETIME OPENSSL SIGC++ LIBXML++ OPENJPEG CXML XMLSEC1 ASDCPLIB_DCPOMATIC XERCES'
254     obj.source = source
255
256     # Library for gcov
257     if bld.is_defined('HAVE_GCOV'):
258         if bld.env.STATIC:
259             obj = bld(features='cxx cxxstlib')
260         else:
261             obj = bld(features='cxx cxxshlib')
262         obj.name = 'libdcp%s_gcov' % bld.env.API_VERSION
263         obj.target = 'dcp%s_gcov' % bld.env.API_VERSION
264         obj.export_includes = ['.']
265         obj.uselib = 'BOOST_FILESYSTEM BOOST_SIGNALS2 BOOST_DATETIME OPENSSL SIGC++ LIBXML++ OPENJPEG CXML XMLSEC1 ASDCPLIB_DCPOMATIC XERCES'
266         obj.use = 'libkumu-libdcp%s libasdcp-libdcp%s' % (bld.env.API_VERSION, bld.env.API_VERSION)
267         obj.source = source
268         obj.cppflags = ['-fprofile-arcs', '-ftest-coverage', '-fno-inline', '-fno-default-inline', '-fno-elide-constructors', '-g', '-O0']
269
270     bld.install_files('${PREFIX}/include/libdcp%s/dcp' % bld.env.API_VERSION, headers)
271     if bld.env.STATIC:
272         bld.install_files('${PREFIX}/lib', 'libdcp%s.a' % bld.env.API_VERSION)