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