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