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