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