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