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