Basic implementation of extra subtitle-scan job to run when the
[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           active_text.cc
25           analyse_audio_job.cc
26           atmos_mxf_content.cc
27           atomicity_checker.cc
28           audio_analysis.cc
29           audio_buffers.cc
30           audio_content.cc
31           audio_decoder.cc
32           audio_delay.cc
33           audio_filter.cc
34           audio_filter_graph.cc
35           audio_mapping.cc
36           audio_merger.cc
37           audio_point.cc
38           audio_processor.cc
39           audio_ring_buffers.cc
40           audio_stream.cc
41           butler.cc
42           text_content.cc
43           text_decoder.cc
44           case_insensitive_sorter.cc
45           checker.cc
46           check_content_change_job.cc
47           cinema.cc
48           cinema_kdms.cc
49           cinema_sound_processor.cc
50           colour_conversion.cc
51           config.cc
52           content.cc
53           content_factory.cc
54           create_cli.cc
55           cross.cc
56           crypto.cc
57           curl_uploader.cc
58           dcp.cc
59           dcp_content.cc
60           dcp_content_type.cc
61           dcp_decoder.cc
62           dcp_encoder.cc
63           dcp_examiner.cc
64           dcp_subtitle.cc
65           dcp_subtitle_content.cc
66           dcp_subtitle_decoder.cc
67           dcp_text_track.cc
68           dcp_video.cc
69           dcpomatic_log.cc
70           dcpomatic_socket.cc
71           dcpomatic_time.cc
72           decoder.cc
73           decoder_factory.cc
74           decoder_part.cc
75           digester.cc
76           dkdm_wrapper.cc
77           dolby_cp750.cc
78           edid.cc
79           emailer.cc
80           empty.cc
81           encoder.cc
82           encode_server.cc
83           encode_server_finder.cc
84           encoded_log_entry.cc
85           environment_info.cc
86           event_history.cc
87           examine_content_job.cc
88           examine_ffmpeg_subtitles_job.cc
89           exceptions.cc
90           file_group.cc
91           file_log.cc
92           filter_graph.cc
93           ffmpeg.cc
94           ffmpeg_audio_stream.cc
95           ffmpeg_content.cc
96           ffmpeg_decoder.cc
97           ffmpeg_encoder.cc
98           ffmpeg_file_encoder.cc
99           ffmpeg_examiner.cc
100           ffmpeg_stream.cc
101           ffmpeg_subtitle_stream.cc
102           film.cc
103           filter.cc
104           ffmpeg_image_proxy.cc
105           font.cc
106           font_files.cc
107           frame_rate_change.cc
108           hints.cc
109           internet.cc
110           image.cc
111           image_content.cc
112           image_decoder.cc
113           image_examiner.cc
114           image_filename_sorter.cc
115           image_proxy.cc
116           isdcf_metadata.cc
117           j2k_image_proxy.cc
118           job.cc
119           job_manager.cc
120           j2k_encoder.cc
121           json_server.cc
122           lock_file_checker.cc
123           log.cc
124           log_entry.cc
125           mid_side_decoder.cc
126           monitor_checker.cc
127           overlaps.cc
128           player.cc
129           player_text.cc
130           player_video.cc
131           playlist.cc
132           position_image.cc
133           ratio.cc
134           raw_image_proxy.cc
135           reel_writer.cc
136           render_text.cc
137           resampler.cc
138           rgba.cc
139           scoped_temporary.cc
140           scp_uploader.cc
141           screen.cc
142           screen_kdm.cc
143           send_kdm_email_job.cc
144           send_notification_email_job.cc
145           send_problem_report_job.cc
146           server.cc
147           shuffler.cc
148           spl.cc
149           spl_entry.cc
150           string_log_entry.cc
151           string_text_file.cc
152           string_text_file_content.cc
153           string_text_file_decoder.cc
154           text_ring_buffers.cc
155           timer.cc
156           transcode_job.cc
157           types.cc
158           signal_manager.cc
159           update_checker.cc
160           upload_job.cc
161           uploader.cc
162           upmixer_a.cc
163           upmixer_b.cc
164           util.cc
165           verify_dcp_job.cc
166           video_content.cc
167           video_content_scale.cc
168           video_decoder.cc
169           video_filter_graph.cc
170           video_mxf_content.cc
171           video_mxf_decoder.cc
172           video_mxf_examiner.cc
173           video_ring_buffers.cc
174           writer.cc
175           """
176
177 def build(bld):
178     if bld.env.STATIC_DCPOMATIC:
179         obj = bld(features = 'cxx cxxstlib')
180     else:
181         obj = bld(features = 'cxx cxxshlib')
182
183     obj.name = 'libdcpomatic2'
184     obj.export_includes = ['..']
185     obj.uselib = """
186                  AVCODEC AVUTIL AVFORMAT AVFILTER SWSCALE
187                  BOOST_FILESYSTEM BOOST_THREAD BOOST_DATETIME BOOST_SIGNALS2 BOOST_REGEX
188                  SAMPLERATE POSTPROC TIFF SSH DCP CXML GLIB LZMA XML++
189                  CURL ZIP FONTCONFIG PANGOMM CAIROMM XMLSEC SUB ICU NETTLE PNG
190                  """
191
192     if bld.env.TARGET_OSX:
193         obj.framework = ['IOKit', 'Foundation']
194
195     obj.source = sources + ' version.cc'
196
197     if bld.env.TARGET_WINDOWS:
198         obj.uselib += ' WINSOCK2 DBGHELP SHLWAPI MSWSOCK BOOST_LOCALE'
199     if bld.env.STATIC_DCPOMATIC:
200         obj.uselib += ' XMLPP'
201
202     obj.target = 'dcpomatic2'
203
204     i18n.po_to_mo(os.path.join('src', 'lib'), 'libdcpomatic2', bld)
205
206 def pot(bld):
207     i18n.pot(os.path.join('src', 'lib'), sources + " util.h", 'libdcpomatic')
208
209 def pot_merge(bld):
210     i18n.pot_merge(os.path.join('src', 'lib'), 'libdcpomatic')