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