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