Bump the PNG subtitle / font buffer a little.
[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_map.cc
40              asset_factory.cc
41              asset_writer.cc
42              atmos_asset.cc
43              atmos_asset_writer.cc
44              bitstream.cc
45              certificate_chain.cc
46              certificate.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              font_asset.cc
61              fsk.cc
62              gamma_transfer_function.cc
63              h_align.cc
64              identity_transfer_function.cc
65              interop_load_font_node.cc
66              interop_subtitle_asset.cc
67              j2k_transcode.cc
68              key.cc
69              language_tag.cc
70              local_time.cc
71              locale_convert.cc
72              metadata.cc
73              modified_gamma_transfer_function.cc
74              mono_picture_asset.cc
75              mono_picture_asset_writer.cc
76              mono_picture_frame.cc
77              mxf.cc
78              name_format.cc
79              object.cc
80              openjpeg_image.cc
81              picture_asset.cc
82              picture_asset_writer.cc
83              pkl.cc
84              rating.cc
85              raw_convert.cc
86              reel.cc
87              reel_asset.cc
88              reel_atmos_asset.cc
89              reel_closed_caption_asset.cc
90              reel_file_asset.cc
91              reel_interop_closed_caption_asset.cc
92              reel_interop_subtitle_asset.cc
93              reel_mono_picture_asset.cc
94              reel_picture_asset.cc
95              reel_markers_asset.cc
96              reel_smpte_closed_caption_asset.cc
97              reel_smpte_subtitle_asset.cc
98              reel_sound_asset.cc
99              reel_stereo_picture_asset.cc
100              reel_subtitle_asset.cc
101              ref.cc
102              rgb_xyz.cc
103              s_gamut3_transfer_function.cc
104              search.cc
105              smpte_load_font_node.cc
106              smpte_subtitle_asset.cc
107              sound_asset.cc
108              sound_asset_writer.cc
109              sound_frame.cc
110              stereo_picture_asset.cc
111              stereo_picture_asset_writer.cc
112              stereo_picture_frame.cc
113              subtitle.cc
114              subtitle_asset.cc
115              subtitle_asset_internal.cc
116              subtitle_image.cc
117              subtitle_standard.cc
118              subtitle_string.cc
119              transfer_function.cc
120              types.cc
121              utc_offset.cc
122              util.cc
123              v_align.cc
124              verify.cc
125              verify_j2k.cc
126              version.cc
127              """
128
129     headers = """
130               array_data.h
131               asset.h
132               asset_list.h
133               asset_map.h
134               asset_reader.h
135               asset_writer.h
136               atmos_asset.h
137               atmos_asset_reader.h
138               atmos_asset_writer.h
139               atmos_frame.h
140               certificate_chain.h
141               certificate.h
142               chromaticity.h
143               colour_conversion.h
144               combine.h
145               compose.hpp
146               content_kind.h
147               cpl.h
148               crypto_context.h
149               data.h
150               dcp.h
151               dcp_assert.h
152               dcp_time.h
153               decrypted_kdm.h
154               decrypted_kdm_key.h
155               encrypted_kdm.h
156               equality_options.h
157               exceptions.h
158               file.h
159               font_asset.h
160               frame.h
161               fsk.h
162               gamma_transfer_function.h
163               h_align.h
164               identity_transfer_function.h
165               interop_load_font_node.h
166               interop_subtitle_asset.h
167               j2k_transcode.h
168               key.h
169               language_tag.h
170               load_font_node.h
171               local_time.h
172               locale_convert.h
173               metadata.h
174               mono_picture_asset.h
175               mono_picture_asset_reader.h
176               mono_picture_asset_writer.h
177               mono_picture_frame.h
178               modified_gamma_transfer_function.h
179               mxf.h
180               name_format.h
181               object.h
182               openjpeg_image.h
183               picture_asset.h
184               picture_asset_writer.h
185               piecewise_lut.h
186               pkl.h
187               rating.h
188               raw_convert.h
189               rgb_xyz.h
190               reel.h
191               reel_asset.h
192               reel_atmos_asset.h
193               reel_closed_caption_asset.h
194               reel_file_asset.h
195               reel_interop_closed_caption_asset.h
196               reel_interop_subtitle_asset.h
197               reel_markers_asset.h
198               reel_mono_picture_asset.h
199               reel_picture_asset.h
200               reel_sound_asset.h
201               reel_smpte_closed_caption_asset.h
202               reel_smpte_subtitle_asset.h
203               reel_stereo_picture_asset.h
204               reel_subtitle_asset.h
205               ref.h
206               s_gamut3_transfer_function.h
207               search.h
208               smpte_load_font_node.h
209               smpte_subtitle_asset.h
210               sound_frame.h
211               sound_asset.h
212               sound_asset_reader.h
213               sound_asset_writer.h
214               stereo_picture_asset.h
215               stereo_picture_asset_reader.h
216               stereo_picture_asset_writer.h
217               stereo_picture_frame.h
218               subtitle.h
219               subtitle_asset.h
220               subtitle_image.h
221               subtitle_standard.h
222               subtitle_string.h
223               transfer_function.h
224               types.h
225               utc_offset.h
226               util.h
227               v_align.h
228               verify.h
229               verify_j2k.h
230               version.h
231               warnings.h
232               """
233
234     # Main library
235     if bld.env.STATIC:
236         obj = bld(features='cxx cxxstlib')
237     else:
238         obj = bld(features='cxx cxxshlib')
239     obj.name = 'libdcp%s' % bld.env.API_VERSION
240     obj.target = 'dcp%s' % bld.env.API_VERSION
241     obj.export_includes = ['.']
242     obj.uselib = 'BOOST_FILESYSTEM BOOST_SIGNALS2 BOOST_DATETIME OPENSSL SIGC++ LIBXML++ OPENJPEG CXML XMLSEC1 ASDCPLIB_CTH XERCES'
243     obj.source = source
244
245     # Library for gcov
246     if bld.is_defined('HAVE_GCOV'):
247         if bld.env.STATIC:
248             obj = bld(features='cxx cxxstlib')
249         else:
250             obj = bld(features='cxx cxxshlib')
251         obj.name = 'libdcp%s_gcov' % bld.env.API_VERSION
252         obj.target = 'dcp%s_gcov' % bld.env.API_VERSION
253         obj.export_includes = ['.']
254         obj.uselib = 'BOOST_FILESYSTEM BOOST_SIGNALS2 BOOST_DATETIME OPENSSL SIGC++ LIBXML++ OPENJPEG CXML XMLSEC1 ASDCPLIB_CTH XERCES'
255         obj.use = 'libkumu-libdcp%s libasdcp-libdcp%s' % (bld.env.API_VERSION, bld.env.API_VERSION)
256         obj.source = source
257         obj.cppflags = ['-fprofile-arcs', '-ftest-coverage', '-fno-inline', '-fno-default-inline', '-fno-elide-constructors', '-g', '-O0']
258
259     bld.install_files('${PREFIX}/include/libdcp%s/dcp' % bld.env.API_VERSION, headers)
260     if bld.env.STATIC:
261         bld.install_files('${PREFIX}/lib', 'libdcp%s.a' % bld.env.API_VERSION)