Basics of Atmos content support; can be added to project and appears in timeline.
[dcpomatic.git] / src / lib / wscript
1 #
2 #    Copyright (C) 2012-2015 Carl Hetherington <cth@carlh.net>
3 #
4 #    This program is free software; you can redistribute it and/or modify
5 #    it under the terms of the GNU General Public License as published by
6 #    the Free Software Foundation; either version 2 of the License, or
7 #    (at your option) any later version.
8 #
9 #    This program is distributed in the hope that it will be useful,
10 #    but WITHOUT ANY WARRANTY; without even the implied warranty of
11 #    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 #    GNU General Public License for more details.
13 #
14 #    You should have received a copy of the GNU General Public License
15 #    along with this program; if not, write to the Free Software
16 #    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17 #
18
19 import os
20 import i18n
21
22 sources = """
23           analyse_audio_job.cc
24           atmos_mxf_content.cc
25           audio_analysis.cc
26           audio_buffers.cc
27           audio_content.cc
28           audio_decoder.cc
29           audio_decoder_stream.cc
30           audio_delay.cc
31           audio_filter.cc
32           audio_filter_graph.cc
33           audio_mapping.cc
34           audio_point.cc
35           audio_processor.cc
36           audio_stream.cc
37           case_insensitive_sorter.cc
38           cinema.cc
39           cinema_kdms.cc
40           cinema_sound_processor.cc
41           colour_conversion.cc
42           config.cc
43           content.cc
44           content_factory.cc
45           cross.cc
46           curl_uploader.cc
47           dcp_content.cc
48           dcp_content_type.cc
49           dcp_decoder.cc
50           dcp_examiner.cc
51           dcp_subtitle.cc
52           dcp_subtitle_content.cc
53           dcp_subtitle_decoder.cc
54           dcp_video.cc
55           dcpomatic_socket.cc
56           dcpomatic_time.cc
57           dolby_cp750.cc
58           emailer.cc
59           encoder.cc
60           encode_server.cc
61           encode_server_finder.cc
62           encoded_log_entry.cc
63           environment_info.cc
64           examine_content_job.cc
65           exceptions.cc
66           file_group.cc
67           file_log.cc
68           filter_graph.cc
69           ffmpeg.cc
70           ffmpeg_audio_stream.cc
71           ffmpeg_content.cc
72           ffmpeg_decoder.cc
73           ffmpeg_examiner.cc
74           ffmpeg_stream.cc
75           ffmpeg_subtitle_stream.cc
76           film.cc
77           filter.cc
78           font.cc
79           font_files.cc
80           frame_rate_change.cc
81           internet.cc
82           image.cc
83           image_content.cc
84           image_decoder.cc
85           image_examiner.cc
86           image_filename_sorter.cc
87           image_proxy.cc
88           isdcf_metadata.cc
89           j2k_image_proxy.cc
90           job.cc
91           job_manager.cc
92           json_server.cc
93           log.cc
94           log_entry.cc
95           magick_image_proxy.cc
96           md5_digester.cc
97           mid_side_decoder.cc
98           overlaps.cc
99           player.cc
100           player_subtitles.cc
101           player_video.cc
102           playlist.cc
103           position_image.cc
104           ratio.cc
105           raw_image_proxy.cc
106           reel_writer.cc
107           render_subtitles.cc
108           resampler.cc
109           rgba.cc
110           safe_stringstream.cc
111           scoped_temporary.cc
112           scp_uploader.cc
113           screen.cc
114           screen_kdm.cc
115           send_kdm_email_job.cc
116           send_problem_report_job.cc
117           server.cc
118           string_log_entry.cc
119           raw_convert.cc
120           subtitle_content.cc
121           subtitle_decoder.cc
122           text_subtitle.cc
123           text_subtitle_content.cc
124           text_subtitle_decoder.cc
125           timer.cc
126           transcode_job.cc
127           transcoder.cc
128           types.cc
129           signal_manager.cc
130           update_checker.cc
131           upload_job.cc
132           uploader.cc
133           upmixer_a.cc
134           upmixer_b.cc
135           util.cc
136           video_content.cc
137           video_content_scale.cc
138           video_decoder.cc
139           video_filter_graph.cc
140           video_mxf_content.cc
141           video_mxf_decoder.cc
142           video_mxf_examiner.cc
143           writer.cc
144           """
145
146 def build(bld):
147     if bld.env.STATIC_DCPOMATIC:
148         obj = bld(features = 'cxx cxxstlib')
149     else:
150         obj = bld(features = 'cxx cxxshlib')
151
152     obj.name = 'libdcpomatic2'
153     obj.export_includes = ['..']
154     obj.uselib = """
155                  AVCODEC AVUTIL AVFORMAT AVFILTER SWSCALE
156                  BOOST_FILESYSTEM BOOST_THREAD BOOST_DATETIME BOOST_SIGNALS2 BOOST_REGEX
157                  SAMPLERATE POSTPROC TIFF MAGICK SSH DCP CXML GLIB LZMA XML++
158                  CURL ZIP FONTCONFIG PANGOMM CAIROMM XMLSEC SUB ICU
159                  """
160
161     if bld.env.TARGET_OSX:
162         obj.framework = ['IOKit', 'Foundation']
163
164     obj.source = sources + ' version.cc'
165
166     if bld.env.TARGET_WINDOWS:
167         obj.uselib += ' WINSOCK2 BFD DBGHELP IBERTY SHLWAPI MSWSOCK BOOST_LOCALE'
168     if bld.env.STATIC_DCPOMATIC:
169         obj.uselib += ' XMLPP'
170
171     obj.target = 'dcpomatic2'
172
173     i18n.po_to_mo(os.path.join('src', 'lib'), 'libdcpomatic2', bld)
174
175 def pot(bld):
176     i18n.pot(os.path.join('src', 'lib'), sources, 'libdcpomatic')
177
178 def pot_merge(bld):
179     i18n.pot_merge(os.path.join('src', 'lib'), 'libdcpomatic')