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