Add very minimal Atmos asset.
[libdcp.git] / src / wscript
1 #
2 #    Copyright (C) 2012-2016 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
19 from waflib import TaskGen
20
21 def build(bld):
22     source = """
23              asset.cc
24              atmos_asset.cc
25              certificate_chain.cc
26              certificate.cc
27              colour_conversion.cc
28              colour_matrix.cc
29              cpl.cc
30              data.cc
31              dcp.cc
32              dcp_time.cc
33              decrypted_kdm.cc
34              decrypted_kdm_key.cc
35              encrypted_kdm.cc
36              exceptions.cc
37              file.cc
38              font_asset.cc
39              font_node.cc
40              gamma_transfer_function.cc
41              interop_load_font_node.cc
42              interop_subtitle_asset.cc
43              j2k.cc
44              key.cc
45              local_time.cc
46              metadata.cc
47              modified_gamma_transfer_function.cc
48              mono_picture_asset.cc
49              mono_picture_asset_writer.cc
50              mono_picture_frame.cc
51              mxf.cc
52              asset_writer.cc
53              object.cc
54              openjpeg_image.cc
55              picture_asset.cc
56              picture_asset_writer.cc
57              reel.cc
58              reel_asset.cc
59              reel_mono_picture_asset.cc
60              reel_mxf.cc
61              reel_picture_asset.cc
62              reel_sound_asset.cc
63              reel_stereo_picture_asset.cc
64              reel_subtitle_asset.cc
65              ref.cc
66              rgb_xyz.cc
67              smpte_load_font_node.cc
68              smpte_subtitle_asset.cc
69              sound_asset.cc
70              sound_asset_writer.cc
71              sound_frame.cc
72              stereo_picture_asset.cc
73              stereo_picture_asset_writer.cc
74              stereo_picture_frame.cc
75              subtitle_node.cc
76              subtitle_asset.cc
77              subtitle_string.cc
78              text_node.cc
79              transfer_function.cc
80              types.cc
81              util.cc
82              version.cc
83              """
84
85     headers = """
86               asset.h
87               atmos_asset.h
88               certificate_chain.h
89               certificate.h
90               chromaticity.h
91               colour_conversion.h
92               colour_matrix.h
93               cpl.h
94               dcp.h
95               dcp_time.h
96               data.h
97               decrypted_kdm.h
98               decrypted_kdm_key.h
99               encrypted_kdm.h
100               exceptions.h
101               font_asset.h
102               gamma_transfer_function.h
103               interop_load_font_node.h
104               interop_subtitle_asset.h
105               j2k.h
106               key.h
107               load_font_node.h
108               local_time.h
109               metadata.h
110               mono_picture_asset.h
111               mono_picture_frame.h
112               modified_gamma_transfer_function.h
113               mxf.h
114               asset_writer.h
115               object.h
116               openjpeg_image.h
117               picture_asset.h
118               picture_asset_writer.h
119               raw_convert.h
120               rgb_xyz.h
121               reel.h
122               reel_asset.h
123               reel_mono_picture_asset.h
124               reel_mxf.h
125               reel_picture_asset.h
126               reel_sound_asset.h
127               reel_stereo_picture_asset.h
128               reel_subtitle_asset.h
129               ref.h
130               smpte_load_font_node.h
131               smpte_subtitle_asset.h
132               sound_frame.h
133               sound_asset.h
134               sound_asset_writer.h
135               stereo_picture_asset.h
136               stereo_picture_frame.h
137               subtitle_node.h
138               subtitle_asset.h
139               subtitle_string.h
140               transfer_function.h
141               types.h
142               util.h
143               version.h
144               """
145
146     # Main library
147     if bld.env.STATIC:
148         obj = bld(features='cxx cxxstlib')
149     else:
150         obj = bld(features='cxx cxxshlib')
151     obj.name = 'libdcp%s' % bld.env.API_VERSION
152     obj.target = 'dcp%s' % bld.env.API_VERSION
153     obj.export_includes = ['.']
154     obj.uselib = 'BOOST_FILESYSTEM BOOST_SIGNALS2 BOOST_DATETIME OPENSSL SIGC++ LIBXML++ OPENJPEG CXML XMLSEC1 ASDCPLIB_CTH'
155     obj.use = 'libkumu-libdcp%s libasdcp-libdcp%s' % (bld.env.API_VERSION, bld.env.API_VERSION)
156     obj.source = source
157
158     # Library for gcov
159     if bld.is_defined('HAVE_GCOV'):
160         obj = bld(features='cxx cxxstlib')
161         obj.name = 'libdcp%s_gcov' % bld.env.API_VERSION
162         obj.target = 'dcp%s_gcov' % bld.env.API_VERSION
163         obj.export_includes = ['.']
164         obj.uselib = 'BOOST_FILESYSTEM BOOST_SIGNALS2 BOOST_DATETIME OPENSSL SIGC++ LIBXML++ OPENJPEG CXML XMLSEC1 ASDCPLIB_CTH'
165         obj.use = 'libkumu-libdcp%s libasdcp-libdcp%s' % (bld.env.API_VERSION, bld.env.API_VERSION)
166         obj.source = source
167         obj.cppflags = ['-fprofile-arcs', '-ftest-coverage', '-fno-inline', '-fno-default-inline', '-fno-elide-constructors', '-g', '-O0']
168
169     bld.install_files('${PREFIX}/include/libdcp%s/dcp' % bld.env.API_VERSION, headers)
170     if bld.env.STATIC:
171         bld.install_files('${PREFIX}/lib', 'libdcp%s.a' % bld.env.API_VERSION)