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