Remove references to libswresample.
[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           audio_analysis.cc
25           audio_buffers.cc
26           audio_content.cc
27           audio_decoder.cc
28           audio_decoder_stream.cc
29           audio_delay.cc
30           audio_filter.cc
31           audio_mapping.cc
32           audio_point.cc
33           audio_processor.cc
34           audio_stream.cc
35           cinema.cc
36           cinema_sound_processor.cc
37           colour_conversion.cc
38           config.cc
39           content.cc
40           content_factory.cc
41           cross.cc
42           curl_uploader.cc
43           data.cc
44           dcp_content.cc
45           dcp_content_type.cc
46           dcp_decoder.cc
47           dcp_examiner.cc
48           dcp_subtitle.cc
49           dcp_subtitle_content.cc
50           dcp_subtitle_decoder.cc
51           dcp_video.cc
52           dcpomatic_socket.cc
53           dcpomatic_time.cc
54           dolby_cp750.cc
55           encoder.cc
56           environment_info.cc
57           examine_content_job.cc
58           exceptions.cc
59           file_group.cc
60           file_log.cc
61           filter_graph.cc
62           ffmpeg.cc
63           ffmpeg_audio_stream.cc
64           ffmpeg_content.cc
65           ffmpeg_decoder.cc
66           ffmpeg_examiner.cc
67           ffmpeg_stream.cc
68           ffmpeg_subtitle_stream.cc
69           film.cc
70           filter.cc
71           font.cc
72           frame_rate_change.cc
73           internet.cc
74           image.cc
75           image_content.cc
76           image_decoder.cc
77           image_examiner.cc
78           image_proxy.cc
79           isdcf_metadata.cc
80           j2k_image_proxy.cc
81           job.cc
82           job_manager.cc
83           kdm.cc
84           json_server.cc
85           log.cc
86           magick_image_proxy.cc
87           md5_digester.cc
88           mid_side_decoder.cc
89           player.cc
90           player_subtitles.cc
91           player_video.cc
92           playlist.cc
93           position_image.cc
94           quickmail.cc
95           ratio.cc
96           raw_image_proxy.cc
97           render_subtitles.cc
98           resampler.cc
99           safe_stringstream.cc
100           scoped_temporary.cc
101           scp_uploader.cc
102           screen.cc
103           send_kdm_email_job.cc
104           send_problem_report_job.cc
105           server.cc
106           server_finder.cc
107           single_stream_audio_content.cc
108           sndfile_base.cc
109           sndfile_content.cc
110           sndfile_decoder.cc
111           sndfile_examiner.cc
112           subrip.cc
113           subrip_content.cc
114           subrip_decoder.cc
115           subtitle_content.cc
116           subtitle_decoder.cc
117           timer.cc
118           transcode_job.cc
119           transcoder.cc
120           types.cc
121           signal_manager.cc
122           update_checker.cc
123           upload_job.cc
124           uploader.cc
125           upmixer_a.cc
126           upmixer_b.cc
127           util.cc
128           video_content.cc
129           video_content_scale.cc
130           video_decoder.cc
131           writer.cc
132           """
133
134 def build(bld):
135     if bld.env.STATIC_DCPOMATIC:
136         obj = bld(features = 'cxx cxxstlib')
137     else:
138         obj = bld(features = 'cxx cxxshlib')
139
140     obj.name = 'libdcpomatic2'
141     obj.export_includes = ['..']
142     obj.uselib = """
143                  AVCODEC AVUTIL AVFORMAT AVFILTER SWSCALE
144                  BOOST_FILESYSTEM BOOST_THREAD BOOST_DATETIME BOOST_SIGNALS2 BOOST_REGEX
145                  SNDFILE SAMPLERATE OPENJPEG POSTPROC TIFF MAGICK SSH DCP CXML GLIB LZMA XML++
146                  CURL ZIP FONTCONFIG PANGOMM CAIROMM XMLSEC SUB ICU
147                  """
148
149     if bld.env.TARGET_OSX:
150         obj.framework = ['IOKit', 'Foundation']
151
152     obj.source = sources + ' version.cc'
153
154     if bld.env.TARGET_WINDOWS:
155         obj.uselib += ' WINSOCK2 BFD DBGHELP IBERTY SHLWAPI MSWSOCK BOOST_LOCALE'
156     if bld.env.STATIC_DCPOMATIC:
157         obj.uselib += ' XMLPP'
158
159     obj.target = 'dcpomatic2'
160
161     i18n.po_to_mo(os.path.join('src', 'lib'), 'libdcpomatic2', bld)
162
163 def pot(bld):
164     i18n.pot(os.path.join('src', 'lib'), sources, 'libdcpomatic')
165
166 def pot_merge(bld):
167     i18n.pot_merge(os.path.join('src', 'lib'), 'libdcpomatic')