Rename TYPE_DEBUG_PLAYER to TYPE_DEBUG_VIDEO_VIEW.
[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           analyse_subtitles_job.cc
27           analytics.cc
28           atmos_mxf_content.cc
29           atomicity_checker.cc
30           audio_analysis.cc
31           audio_buffers.cc
32           audio_content.cc
33           audio_decoder.cc
34           audio_delay.cc
35           audio_filter.cc
36           audio_filter_graph.cc
37           audio_mapping.cc
38           audio_merger.cc
39           audio_point.cc
40           audio_processor.cc
41           audio_ring_buffers.cc
42           audio_stream.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_sound_processor.cc
51           colour_conversion.cc
52           config.cc
53           content.cc
54           content_factory.cc
55           copy_dcp_details_to_film.cc
56           create_cli.cc
57           cross_common.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_recipient.cc
81           dkdm_wrapper.cc
82           dolby_cp750.cc
83           edid.cc
84           emailer.cc
85           empty.cc
86           encoder.cc
87           encode_server.cc
88           encode_server_finder.cc
89           encoded_log_entry.cc
90           encrypted_ecinema_kdm.cc
91           environment_info.cc
92           event_history.cc
93           examine_content_job.cc
94           examine_ffmpeg_subtitles_job.cc
95           exceptions.cc
96           file_group.cc
97           file_log.cc
98           filter_graph.cc
99           ffmpeg.cc
100           ffmpeg_audio_stream.cc
101           ffmpeg_content.cc
102           ffmpeg_decoder.cc
103           ffmpeg_encoder.cc
104           ffmpeg_file_encoder.cc
105           ffmpeg_examiner.cc
106           ffmpeg_stream.cc
107           ffmpeg_subtitle_stream.cc
108           film.cc
109           filter.cc
110           ffmpeg_image_proxy.cc
111           font.cc
112           frame_interval_checker.cc
113           frame_rate_change.cc
114           hints.cc
115           internet.cc
116           image.cc
117           image_content.cc
118           image_decoder.cc
119           image_examiner.cc
120           image_filename_sorter.cc
121           image_proxy.cc
122           isdcf_metadata.cc
123           j2k_image_proxy.cc
124           job.cc
125           job_manager.cc
126           j2k_encoder.cc
127           json_server.cc
128           kdm_with_metadata.cc
129           kdm_recipient.cc
130           lock_file_checker.cc
131           log.cc
132           log_entry.cc
133           mid_side_decoder.cc
134           monitor_checker.cc
135           overlaps.cc
136           player.cc
137           player_text.cc
138           player_video.cc
139           playlist.cc
140           position_image.cc
141           ratio.cc
142           raw_image_proxy.cc
143           reel_writer.cc
144           render_text.cc
145           resampler.cc
146           rgba.cc
147           scoped_temporary.cc
148           scp_uploader.cc
149           screen.cc
150           send_kdm_email_job.cc
151           send_notification_email_job.cc
152           send_problem_report_job.cc
153           server.cc
154           shuffler.cc
155           state.cc
156           spl.cc
157           spl_entry.cc
158           string_log_entry.cc
159           string_text_file.cc
160           string_text_file_content.cc
161           string_text_file_decoder.cc
162           subtitle_analysis.cc
163           subtitle_encoder.cc
164           text_ring_buffers.cc
165           timer.cc
166           transcode_job.cc
167           trusted_device.cc
168           types.cc
169           signal_manager.cc
170           stdout_log.cc
171           update_checker.cc
172           upload_job.cc
173           uploader.cc
174           upmixer_a.cc
175           upmixer_b.cc
176           usl.cc
177           util.cc
178           verify_dcp_job.cc
179           video_content.cc
180           video_decoder.cc
181           video_filter_graph.cc
182           video_mxf_content.cc
183           video_mxf_decoder.cc
184           video_mxf_examiner.cc
185           video_ring_buffers.cc
186           writer.cc
187           zipper.cc
188           """
189
190 def build(bld):
191     if bld.env.STATIC_DCPOMATIC:
192         obj = bld(features = 'cxx cxxstlib')
193     else:
194         obj = bld(features = 'cxx cxxshlib')
195
196     obj.name = 'libdcpomatic2'
197     obj.export_includes = ['..']
198     obj.uselib = """
199                  AVCODEC AVUTIL AVFORMAT AVFILTER SWSCALE
200                  BOOST_FILESYSTEM BOOST_THREAD BOOST_DATETIME BOOST_SIGNALS2 BOOST_REGEX
201                  SAMPLERATE POSTPROC TIFF SSH DCP CXML GLIB LZMA XML++
202                  CURL ZIP FONTCONFIG PANGOMM CAIROMM XMLSEC SUB ICU NETTLE PNG LEQM_NRT
203                  """
204
205     if bld.env.TARGET_OSX:
206         obj.framework = ['IOKit', 'Foundation', 'DiskArbitration']
207
208     obj.source = sources + ' version.cc'
209
210     if bld.env.VARIANT == 'swaroop-theater' or bld.env.VARIANT == 'swaroop-studio':
211         obj.source += ' swaroop_spl.cc swaroop_spl_entry.cc'
212
213     if bld.env.ENABLE_DISK:
214         obj.source += ' copy_to_drive_job.cc nanomsg.cc'
215         obj.uselib += ' LWEXT4 NANOMSG'
216         if bld.env.TARGET_LINUX:
217             obj.uselib += ' POLKIT'
218
219     if bld.env.TARGET_WINDOWS:
220         obj.uselib += ' WINSOCK2 DBGHELP SHLWAPI MSWSOCK BOOST_LOCALE SETUPAPI'
221         obj.source += ' cross_windows.cc'
222     if bld.env.TARGET_OSX:
223         obj.source += ' cross_osx.cc'
224     if bld.env.TARGET_LINUX:
225         obj.source += ' cross_linux.cc'
226     if bld.env.STATIC_DCPOMATIC:
227         obj.uselib += ' XMLPP'
228
229     obj.target = 'dcpomatic2'
230
231     i18n.po_to_mo(os.path.join('src', 'lib'), 'libdcpomatic2', bld)
232
233 def pot(bld):
234     i18n.pot(os.path.join('src', 'lib'), sources + " util.h", 'libdcpomatic')
235
236 def pot_merge(bld):
237     i18n.pot_merge(os.path.join('src', 'lib'), 'libdcpomatic')