32a2cde238d0f0c0bc81a24a89fb86e6eec7f224
[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_content.cc
10           audio_decoder.cc
11           audio_source.cc
12           config.cc
13           combiner.cc
14           content.cc
15           cross.cc
16           dci_metadata.cc
17           dcp_content_type.cc
18           dcp_video_frame.cc
19           decoder.cc
20           delay_line.cc
21           dolby_cp750.cc
22           encoder.cc
23           examine_content_job.cc
24           exceptions.cc
25           filter_graph.cc
26           ffmpeg_compatibility.cc
27           ffmpeg_content.cc
28           ffmpeg_decoder.cc
29           film.cc
30           filter.cc
31           format.cc
32           gain.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           matcher.cc
41           player.cc
42           playlist.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           subtitle.cc
50           timer.cc
51           transcode_job.cc
52           transcoder.cc
53           types.cc
54           ui_signaller.cc
55           util.cc
56           version.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 = 'libdvdomatic'
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     if bld.env.TARGET_WINDOWS:
77         obj.uselib += ' WINSOCK2'
78     obj.source = sources
79     obj.target = 'dvdomatic'
80
81     i18n.po_to_mo(os.path.join('src', 'lib'), 'libdvdomatic', bld)
82
83 def pot(bld):
84     i18n.pot(os.path.join('src', 'lib'), sources, 'libdvdomatic')
85
86 def pot_merge(bld):
87     i18n.pot_merge(os.path.join('src', 'lib'), 'libdvdomatic')