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