Remove XMLMetadata.
[libdcp.git] / src / wscript
1 #
2 #    Copyright (C) 2012-2019 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              asset.cc
38              asset_factory.cc
39              asset_writer.cc
40              atmos_asset.cc
41              atmos_asset_writer.cc
42              bitstream.cc
43              certificate_chain.cc
44              certificate.cc
45              chromaticity.cc
46              colour_conversion.cc
47              combine.cc
48              cpl.cc
49              data.cc
50              dcp.cc
51              dcp_time.cc
52              decrypted_kdm.cc
53              decrypted_kdm_key.cc
54              encrypted_kdm.cc
55              exceptions.cc
56              file.cc
57              font_asset.cc
58              fsk.cc
59              gamma_transfer_function.cc
60              identity_transfer_function.cc
61              interop_load_font_node.cc
62              interop_subtitle_asset.cc
63              j2k.cc
64              key.cc
65              local_time.cc
66              locale_convert.cc
67              metadata.cc
68              modified_gamma_transfer_function.cc
69              mono_picture_asset.cc
70              mono_picture_asset_writer.cc
71              mono_picture_frame.cc
72              mxf.cc
73              name_format.cc
74              object.cc
75              openjpeg_image.cc
76              picture_asset.cc
77              picture_asset_writer.cc
78              pkl.cc
79              raw_convert.cc
80              reel.cc
81              reel_asset.cc
82              reel_atmos_asset.cc
83              reel_closed_caption_asset.cc
84              reel_mono_picture_asset.cc
85              reel_mxf.cc
86              reel_picture_asset.cc
87              reel_markers_asset.cc
88              reel_sound_asset.cc
89              reel_stereo_picture_asset.cc
90              reel_subtitle_asset.cc
91              ref.cc
92              rgb_xyz.cc
93              s_gamut3_transfer_function.cc
94              smpte_load_font_node.cc
95              smpte_subtitle_asset.cc
96              sound_asset.cc
97              sound_asset_writer.cc
98              sound_frame.cc
99              stereo_picture_asset.cc
100              stereo_picture_asset_writer.cc
101              stereo_picture_frame.cc
102              subtitle.cc
103              subtitle_asset.cc
104              subtitle_asset_internal.cc
105              subtitle_image.cc
106              subtitle_string.cc
107              transfer_function.cc
108              types.cc
109              util.cc
110              verify.cc
111              version.cc
112              """
113
114     headers = """
115               asset.h
116               asset_reader.h
117               asset_writer.h
118               atmos_asset.h
119               atmos_asset_reader.h
120               atmos_asset_writer.h
121               atmos_frame.h
122               certificate_chain.h
123               certificate.h
124               chromaticity.h
125               colour_conversion.h
126               combine.h
127               compose.hpp
128               cpl.h
129               crypto_context.h
130               dcp.h
131               dcp_assert.h
132               dcp_time.h
133               data.h
134               decrypted_kdm.h
135               decrypted_kdm_key.h
136               encrypted_kdm.h
137               exceptions.h
138               font_asset.h
139               frame.h
140               fsk.h
141               gamma_transfer_function.h
142               identity_transfer_function.h
143               interop_load_font_node.h
144               interop_subtitle_asset.h
145               j2k.h
146               key.h
147               load_font_node.h
148               local_time.h
149               locale_convert.h
150               metadata.h
151               mono_picture_asset.h
152               mono_picture_asset_reader.h
153               mono_picture_frame.h
154               modified_gamma_transfer_function.h
155               mxf.h
156               name_format.h
157               object.h
158               openjpeg_image.h
159               picture_asset.h
160               picture_asset_writer.h
161               pkl.h
162               raw_convert.h
163               rgb_xyz.h
164               reel.h
165               reel_asset.h
166               reel_atmos_asset.h
167               reel_closed_caption_asset.h
168               reel_markers_asset.h
169               reel_mono_picture_asset.h
170               reel_mxf.h
171               reel_picture_asset.h
172               reel_sound_asset.h
173               reel_stereo_picture_asset.h
174               reel_subtitle_asset.h
175               ref.h
176               s_gamut3_transfer_function.h
177               smpte_load_font_node.h
178               smpte_subtitle_asset.h
179               sound_frame.h
180               sound_asset.h
181               sound_asset_reader.h
182               sound_asset_writer.h
183               stereo_picture_asset.h
184               stereo_picture_asset_reader.h
185               stereo_picture_asset_writer.h
186               stereo_picture_frame.h
187               subtitle.h
188               subtitle_asset.h
189               subtitle_image.h
190               subtitle_string.h
191               transfer_function.h
192               types.h
193               util.h
194               verify.h
195               version.h
196               """
197
198     # Main library
199     if bld.env.STATIC:
200         obj = bld(features='cxx cxxstlib')
201     else:
202         obj = bld(features='cxx cxxshlib')
203     obj.name = 'libdcp%s' % bld.env.API_VERSION
204     obj.target = 'dcp%s' % bld.env.API_VERSION
205     obj.export_includes = ['.']
206     obj.uselib = 'BOOST_FILESYSTEM BOOST_SIGNALS2 BOOST_DATETIME OPENSSL SIGC++ LIBXML++ OPENJPEG CXML XMLSEC1 ASDCPLIB_CTH XERCES'
207     obj.source = source
208
209     # Library for gcov
210     if bld.is_defined('HAVE_GCOV'):
211         if bld.env.STATIC:
212             obj = bld(features='cxx cxxstlib')
213         else:
214             obj = bld(features='cxx cxxshlib')
215         obj.name = 'libdcp%s_gcov' % bld.env.API_VERSION
216         obj.target = 'dcp%s_gcov' % bld.env.API_VERSION
217         obj.export_includes = ['.']
218         obj.uselib = 'BOOST_FILESYSTEM BOOST_SIGNALS2 BOOST_DATETIME OPENSSL SIGC++ LIBXML++ OPENJPEG CXML XMLSEC1 ASDCPLIB_CTH XERCES'
219         obj.use = 'libkumu-libdcp%s libasdcp-libdcp%s' % (bld.env.API_VERSION, bld.env.API_VERSION)
220         obj.source = source
221         obj.cppflags = ['-fprofile-arcs', '-ftest-coverage', '-fno-inline', '-fno-default-inline', '-fno-elide-constructors', '-g', '-O0']
222
223     bld.install_files('${PREFIX}/include/libdcp%s/dcp' % bld.env.API_VERSION, headers)
224     if bld.env.STATIC:
225         bld.install_files('${PREFIX}/lib', 'libdcp%s.a' % bld.env.API_VERSION)