e3c8def4e77705eba36e24a655b1cf08e946d84b
[dcpomatic.git] / src / lib / wscript
1 import os
2 import i18n
3
4 sources = """
5           analyse_audio_job.cc
6           audio_analysis.cc
7           audio_buffers.cc
8           audio_content.cc
9           audio_decoder.cc
10           audio_filter.cc
11           audio_mapping.cc
12           audio_processor.cc
13           cinema.cc
14           cinema_sound_processor.cc
15           colour_conversion.cc
16           config.cc
17           content.cc
18           content_factory.cc
19           content_subtitle.cc
20           cross.cc
21           dcp_content.cc
22           dcp_content_type.cc
23           dcp_decoder.cc
24           dcp_examiner.cc
25           dcp_subtitle.cc
26           dcp_subtitle_content.cc
27           dcp_subtitle_decoder.cc
28           dcp_video.cc
29           dcpomatic_time.cc
30           dolby_cp750.cc
31           encoder.cc
32           encoded_data.cc
33           examine_content_job.cc
34           exceptions.cc
35           file_group.cc
36           filter_graph.cc
37           ffmpeg.cc
38           ffmpeg_audio_stream.cc
39           ffmpeg_content.cc
40           ffmpeg_decoder.cc
41           ffmpeg_examiner.cc
42           ffmpeg_stream.cc
43           ffmpeg_subtitle_stream.cc
44           film.cc
45           filter.cc
46           font.cc
47           frame_rate_change.cc
48           internet.cc
49           image.cc
50           image_content.cc
51           image_decoder.cc
52           image_examiner.cc
53           image_proxy.cc
54           isdcf_metadata.cc
55           j2k_image_proxy.cc
56           job.cc
57           job_manager.cc
58           kdm.cc
59           log.cc
60           magick_image_proxy.cc
61           md5_digester.cc
62           mid_side_decoder.cc
63           player.cc
64           player_video.cc
65           playlist.cc
66           position_image.cc
67           quickmail.cc
68           ratio.cc
69           raw_image_proxy.cc
70           render_subtitles.cc
71           resampler.cc
72           safe_stringstream.cc
73           scp_dcp_job.cc
74           scaler.cc
75           scoped_temporary.cc
76           send_kdm_email_job.cc
77           send_problem_report_job.cc
78           server.cc
79           server_finder.cc
80           single_stream_audio_content.cc
81           sndfile_content.cc
82           sndfile_decoder.cc
83           subrip.cc
84           subrip_content.cc
85           subrip_decoder.cc
86           subtitle_content.cc
87           subtitle_decoder.cc
88           timer.cc
89           transcode_job.cc
90           transcoder.cc
91           types.cc
92           ui_signaller.cc
93           update.cc
94           upmixer_a.cc
95           util.cc
96           video_content.cc
97           video_content_scale.cc
98           video_decoder.cc
99           writer.cc
100           """
101
102 def build(bld):
103     if bld.env.BUILD_STATIC:
104         obj = bld(features = 'cxx cxxstlib')
105     else:
106         obj = bld(features = 'cxx cxxshlib')
107
108     obj.name = 'libdcpomatic2'
109     obj.export_includes = ['..']
110     obj.uselib = """
111                  AVCODEC AVUTIL AVFORMAT AVFILTER SWSCALE SWRESAMPLE 
112                  BOOST_FILESYSTEM BOOST_THREAD BOOST_DATETIME BOOST_SIGNALS2
113                  SNDFILE OPENJPEG POSTPROC TIFF MAGICK SSH DCP CXML GLIB LZMA XML++
114                  CURL ZIP PANGOMM CAIROMM XMLSEC SUB
115                  """
116
117     if bld.env.TARGET_OSX:
118         obj.framework = ['IOKit', 'Foundation']
119
120     obj.source = sources + ' version.cc'
121
122     if bld.env.TARGET_WINDOWS:
123         obj.uselib += ' WINSOCK2 BFD DBGHELP IBERTY SHLWAPI MSWSOCK BOOST_LOCALE'
124     if bld.env.BUILD_STATIC:
125         obj.uselib += ' XMLPP'
126
127     obj.target = 'dcpomatic2'
128
129     i18n.po_to_mo(os.path.join('src', 'lib'), 'libdcpomatic2', bld)
130
131 def pot(bld):
132     i18n.pot(os.path.join('src', 'lib'), sources, 'libdcpomatic')
133
134 def pot_merge(bld):
135     i18n.pot_merge(os.path.join('src', 'lib'), 'libdcpomatic')