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