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