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