Merge master and multifarious hackery.
[dcpomatic.git] / src / lib / wscript
1 import os
2 import i18n
3
4 sources = """
5           ab_transcode_job.cc
6           ab_transcoder.cc
7           analyse_audio_job.cc
8           audio_analysis.cc
9           audio_buffers.cc
10           audio_content.cc
11           audio_decoder.cc
12           audio_mapping.cc
13           audio_source.cc
14           black_decoder.cc
15           config.cc
16           combiner.cc
17           container.cc
18           content.cc
19           cross.cc
20           dci_metadata.cc
21           dcp_content_type.cc
22           dcp_video_frame.cc
23           decoder.cc
24           dolby_cp750.cc
25           encoder.cc
26           examine_content_job.cc
27           exceptions.cc
28           filter_graph.cc
29           ffmpeg_content.cc
30           ffmpeg_decoder.cc
31           film.cc
32           filter.cc
33           format.cc
34           image.cc
35           imagemagick_content.cc
36           imagemagick_decoder.cc
37           job.cc
38           job_manager.cc
39           log.cc
40           lut.cc
41           null_content.cc
42           player.cc
43           playlist.cc
44           scp_dcp_job.cc
45           scaler.cc
46           server.cc
47           silence_decoder.cc
48           sndfile_content.cc
49           sndfile_decoder.cc
50           sound_processor.cc
51           subtitle.cc
52           timer.cc
53           transcode_job.cc
54           transcoder.cc
55           types.cc
56           ui_signaller.cc
57           util.cc
58           video_content.cc
59           video_decoder.cc
60           video_source.cc
61           writer.cc
62           """
63
64 def build(bld):
65     if bld.env.STATIC:
66         obj = bld(features = 'cxx cxxstlib')
67     else:
68         obj = bld(features = 'cxx cxxshlib')
69
70     obj.name = 'libdcpomatic'
71     obj.export_includes = ['.']
72     obj.uselib = """
73                  AVCODEC AVUTIL AVFORMAT AVFILTER SWSCALE SWRESAMPLE 
74                  BOOST_FILESYSTEM BOOST_THREAD BOOST_DATETIME BOOST_SIGNALS2 
75                  SNDFILE OPENJPEG POSTPROC TIFF MAGICK SSH DCP CXML GLIB LZMA
76                  """
77
78     obj.source = sources + ' version.cc'
79
80     if bld.env.TARGET_WINDOWS:
81         obj.uselib += ' WINSOCK2 BFD DBGHELP IBERTY'
82         obj.source += ' stack.cpp'
83     if bld.env.STATIC:
84         obj.uselib += ' XML++'
85     obj.source = sources + " version.cc"
86     obj.target = 'dcpomatic'
87
88     i18n.po_to_mo(os.path.join('src', 'lib'), 'libdcpomatic', bld)
89
90 def pot(bld):
91     i18n.pot(os.path.join('src', 'lib'), sources, 'libdcpomatic')
92
93 def pot_merge(bld):
94     i18n.pot_merge(os.path.join('src', 'lib'), 'libdcpomatic')