Merge master.
[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_mapping.cc
11           cinema.cc
12           colour_conversion.cc
13           config.cc
14           content.cc
15           content_factory.cc
16           content_subtitle.cc
17           cross.cc
18           dcp_content_type.cc
19           dcp_video.cc
20           dcpomatic_time.cc
21           dolby_cp750.cc
22           encoder.cc
23           encoded_data.cc
24           examine_content_job.cc
25           exceptions.cc
26           file_group.cc
27           filter_graph.cc
28           ffmpeg.cc
29           ffmpeg_audio_stream.cc
30           ffmpeg_content.cc
31           ffmpeg_decoder.cc
32           ffmpeg_examiner.cc
33           ffmpeg_stream.cc
34           ffmpeg_subtitle_stream.cc
35           film.cc
36           filter.cc
37           frame_rate_change.cc
38           internet.cc
39           image.cc
40           image_content.cc
41           image_decoder.cc
42           image_examiner.cc
43           image_proxy.cc
44           isdcf_metadata.cc
45           job.cc
46           job_manager.cc
47           kdm.cc
48           json_server.cc
49           log.cc
50           md5_digester.cc
51           player.cc
52           player_video.cc
53           playlist.cc
54           ratio.cc
55           render_subtitles.cc
56           resampler.cc
57           scp_dcp_job.cc
58           scaler.cc
59           send_kdm_email_job.cc
60           server.cc
61           server_finder.cc
62           sndfile_content.cc
63           sndfile_decoder.cc
64           sound_processor.cc
65           subrip.cc
66           subrip_content.cc
67           subrip_decoder.cc
68           subtitle_content.cc
69           subtitle_decoder.cc
70           timer.cc
71           transcode_job.cc
72           transcoder.cc
73           types.cc
74           ui_signaller.cc
75           update.cc
76           util.cc
77           video_content.cc
78           video_decoder.cc
79           writer.cc
80           """
81
82 def build(bld):
83     if bld.env.BUILD_STATIC:
84         obj = bld(features = 'cxx cxxstlib')
85     else:
86         obj = bld(features = 'cxx cxxshlib')
87
88     obj.name = 'libdcpomatic'
89     obj.export_includes = ['..']
90     obj.uselib = """
91                  AVCODEC AVUTIL AVFORMAT AVFILTER SWSCALE SWRESAMPLE 
92                  BOOST_FILESYSTEM BOOST_THREAD BOOST_DATETIME BOOST_SIGNALS2
93                  SNDFILE OPENJPEG POSTPROC TIFF MAGICK SSH DCP CXML GLIB LZMA XML++
94                  CURL ZIP QUICKMAIL PANGOMM CAIROMM
95                  """
96
97     if bld.env.TARGET_OSX:
98         obj.framework = ['IOKit', 'Foundation']
99
100     obj.source = sources + ' version.cc'
101
102     if bld.env.TARGET_WINDOWS:
103         obj.uselib += ' WINSOCK2 BFD DBGHELP IBERTY SHLWAPI MSWSOCK BOOST_LOCALE'
104         obj.source += ' stack.cpp'
105     if bld.env.BUILD_STATIC:
106         obj.uselib += ' XML++'
107
108     obj.target = 'dcpomatic'
109
110     i18n.po_to_mo(os.path.join('src', 'lib'), 'libdcpomatic', bld)
111
112 def pot(bld):
113     i18n.pot(os.path.join('src', 'lib'), sources, 'libdcpomatic')
114
115 def pot_merge(bld):
116     i18n.pot_merge(os.path.join('src', 'lib'), 'libdcpomatic')