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