Merge branch 'master' into 2.0--libdcp-1.0
[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           file_group.cc
26           filter_graph.cc
27           ffmpeg.cc
28           ffmpeg_content.cc
29           ffmpeg_decoder.cc
30           ffmpeg_examiner.cc
31           film.cc
32           filter.cc
33           image.cc
34           image_content.cc
35           image_decoder.cc
36           image_examiner.cc
37           job.cc
38           job_manager.cc
39           kdm.cc
40           log.cc
41           player.cc
42           playlist.cc
43           ratio.cc
44           render_subtitles.cc
45           resampler.cc
46           scp_dcp_job.cc
47           scaler.cc
48           send_kdm_email_job.cc
49           server.cc
50           server_finder.cc
51           sndfile_content.cc
52           sndfile_decoder.cc
53           sound_processor.cc
54           subrip.cc
55           subrip_content.cc
56           subrip_decoder.cc
57           subtitle_content.cc
58           subtitle_decoder.cc
59           timer.cc
60           transcode_job.cc
61           transcoder.cc
62           types.cc
63           ui_signaller.cc
64           update.cc
65           util.cc
66           video_content.cc
67           video_decoder.cc
68           writer.cc
69           """
70
71 def build(bld):
72     if bld.env.BUILD_STATIC:
73         obj = bld(features = 'cxx cxxstlib')
74     else:
75         obj = bld(features = 'cxx cxxshlib')
76
77     obj.name = 'libdcpomatic'
78     obj.export_includes = ['..']
79     obj.uselib = """
80                  AVCODEC AVUTIL AVFORMAT AVFILTER SWSCALE SWRESAMPLE 
81                  BOOST_FILESYSTEM BOOST_THREAD BOOST_DATETIME BOOST_SIGNALS2
82                  SNDFILE OPENJPEG POSTPROC TIFF MAGICK SSH DCP CXML GLIB LZMA XML++
83                  CURL ZIP QUICKMAIL PANGOMM CAIROMM
84                  """
85
86     obj.source = sources + ' version.cc'
87
88     if bld.env.TARGET_WINDOWS:
89         obj.uselib += ' WINSOCK2 BFD DBGHELP IBERTY SHLWAPI MSWSOCK BOOST_LOCALE'
90         obj.source += ' stack.cpp'
91     if bld.env.BUILD_STATIC:
92         obj.uselib += ' XML++'
93
94     obj.target = 'dcpomatic'
95
96     i18n.po_to_mo(os.path.join('src', 'lib'), 'libdcpomatic', bld)
97
98 def pot(bld):
99     i18n.pot(os.path.join('src', 'lib'), sources, 'libdcpomatic')
100
101 def pot_merge(bld):
102     i18n.pot_merge(os.path.join('src', 'lib'), 'libdcpomatic')