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