Various work on the audio code.
[dcpomatic.git] / src / lib / wscript
1 #
2 #    Copyright (C) 2012-2015 Carl Hetherington <cth@carlh.net>
3 #
4 #    This file is part of DCP-o-matic.
5 #
6 #    DCP-o-matic is free software; you can redistribute it and/or modify
7 #    it under the terms of the GNU General Public License as published by
8 #    the Free Software Foundation; either version 2 of the License, or
9 #    (at your option) any later version.
10 #
11 #    DCP-o-matic is distributed in the hope that it will be useful,
12 #    but WITHOUT ANY WARRANTY; without even the implied warranty of
13 #    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 #    GNU General Public License for more details.
15 #
16 #    You should have received a copy of the GNU General Public License
17 #    along with DCP-o-matic.  If not, see <http://www.gnu.org/licenses/>.
18 #
19
20 import os
21 import i18n
22
23 sources = """
24           analyse_audio_job.cc
25           atmos_mxf_content.cc
26           audio_analysis.cc
27           audio_buffers.cc
28           audio_content.cc
29           audio_decoder.cc
30           audio_decoder_stream.cc
31           audio_delay.cc
32           audio_filter.cc
33           audio_filter_graph.cc
34           audio_mapping.cc
35           audio_merger.cc
36           audio_point.cc
37           audio_processor.cc
38           audio_stream.cc
39           case_insensitive_sorter.cc
40           cinema.cc
41           cinema_kdms.cc
42           cinema_sound_processor.cc
43           colour_conversion.cc
44           config.cc
45           content.cc
46           content_factory.cc
47           cross.cc
48           curl_uploader.cc
49           dcp.cc
50           dcp_content.cc
51           dcp_content_type.cc
52           dcp_decoder.cc
53           dcp_examiner.cc
54           dcp_subtitle.cc
55           dcp_subtitle_content.cc
56           dcp_subtitle_decoder.cc
57           dcp_video.cc
58           dcpomatic_socket.cc
59           dcpomatic_time.cc
60           decoder.cc
61           decoder_factory.cc
62           decoder_part.cc
63           digester.cc
64           dolby_cp750.cc
65           emailer.cc
66           encoder.cc
67           encode_server.cc
68           encode_server_finder.cc
69           encoded_log_entry.cc
70           environment_info.cc
71           examine_content_job.cc
72           exceptions.cc
73           file_group.cc
74           file_log.cc
75           filter_graph.cc
76           ffmpeg.cc
77           ffmpeg_audio_stream.cc
78           ffmpeg_content.cc
79           ffmpeg_decoder.cc
80           ffmpeg_examiner.cc
81           ffmpeg_stream.cc
82           ffmpeg_subtitle_stream.cc
83           film.cc
84           filter.cc
85           font.cc
86           font_files.cc
87           frame_rate_change.cc
88           hints.cc
89           internet.cc
90           image.cc
91           image_content.cc
92           image_decoder.cc
93           image_examiner.cc
94           image_filename_sorter.cc
95           image_proxy.cc
96           isdcf_metadata.cc
97           j2k_image_proxy.cc
98           job.cc
99           job_manager.cc
100           json_server.cc
101           log.cc
102           log_entry.cc
103           magick_image_proxy.cc
104           mid_side_decoder.cc
105           overlaps.cc
106           player.cc
107           player_subtitles.cc
108           player_video.cc
109           playlist.cc
110           position_image.cc
111           ratio.cc
112           raw_image_proxy.cc
113           reel_writer.cc
114           render_subtitles.cc
115           resampler.cc
116           rgba.cc
117           scoped_temporary.cc
118           scp_uploader.cc
119           screen.cc
120           screen_kdm.cc
121           send_kdm_email_job.cc
122           send_problem_report_job.cc
123           server.cc
124           string_log_entry.cc
125           subtitle_content.cc
126           subtitle_decoder.cc
127           text_subtitle.cc
128           text_subtitle_content.cc
129           text_subtitle_decoder.cc
130           timer.cc
131           transcode_job.cc
132           transcoder.cc
133           types.cc
134           signal_manager.cc
135           update_checker.cc
136           upload_job.cc
137           uploader.cc
138           upmixer_a.cc
139           upmixer_b.cc
140           util.cc
141           video_content.cc
142           video_content_scale.cc
143           video_decoder.cc
144           video_filter_graph.cc
145           video_frame.cc
146           video_mxf_content.cc
147           video_mxf_decoder.cc
148           video_mxf_examiner.cc
149           writer.cc
150           """
151
152 def build(bld):
153     if bld.env.STATIC_DCPOMATIC:
154         obj = bld(features = 'cxx cxxstlib')
155     else:
156         obj = bld(features = 'cxx cxxshlib')
157
158     obj.name = 'libdcpomatic2'
159     obj.export_includes = ['..']
160     obj.uselib = """
161                  AVCODEC AVUTIL AVFORMAT AVFILTER SWSCALE
162                  BOOST_FILESYSTEM BOOST_THREAD BOOST_DATETIME BOOST_SIGNALS2 BOOST_REGEX
163                  SAMPLERATE POSTPROC TIFF MAGICK SSH DCP CXML GLIB LZMA XML++
164                  CURL ZIP FONTCONFIG PANGOMM CAIROMM XMLSEC SUB ICU NETTLE
165                  """
166
167     if bld.env.TARGET_OSX:
168         obj.framework = ['IOKit', 'Foundation']
169
170     obj.source = sources + ' version.cc'
171
172     if bld.env.TARGET_WINDOWS:
173         obj.uselib += ' WINSOCK2 BFD DBGHELP IBERTY SHLWAPI MSWSOCK BOOST_LOCALE'
174     if bld.env.STATIC_DCPOMATIC:
175         obj.uselib += ' XMLPP'
176
177     obj.target = 'dcpomatic2'
178
179     i18n.po_to_mo(os.path.join('src', 'lib'), 'libdcpomatic2', bld)
180
181 def pot(bld):
182     i18n.pot(os.path.join('src', 'lib'), sources, 'libdcpomatic')
183
184 def pot_merge(bld):
185     i18n.pot_merge(os.path.join('src', 'lib'), 'libdcpomatic')