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           cinema.cc
12           colour_conversion.cc
13           config.cc
14           content.cc
15           content_factory.cc
16           content_subtitle.cc
17           cross.cc
18           dci_metadata.cc
19           dcp_content_type.cc
20           dcp_video_frame.cc
21           dcpomatic_time.cc
22           dolby_cp750.cc
23           encoder.cc
24           examine_content_job.cc
25           exceptions.cc
26           file_group.cc
27           filter_graph.cc
28           ffmpeg.cc
29           ffmpeg_content.cc
30           ffmpeg_decoder.cc
31           ffmpeg_examiner.cc
32           film.cc
33           filter.cc
34           frame_rate_change.cc
35           internet.cc
36           image.cc
37           image_content.cc
38           image_decoder.cc
39           image_examiner.cc
40           image_proxy.cc
41           job.cc
42           job_manager.cc
43           kdm.cc
44           json_server.cc
45           log.cc
46           player.cc
47           player_video_frame.cc
48           playlist.cc
49           ratio.cc
50           render_subtitles.cc
51           resampler.cc
52           scp_dcp_job.cc
53           scaler.cc
54           send_kdm_email_job.cc
55           server.cc
56           server_finder.cc
57           sndfile_content.cc
58           sndfile_decoder.cc
59           sound_processor.cc
60           subrip.cc
61           subrip_content.cc
62           subrip_decoder.cc
63           subtitle_content.cc
64           subtitle_decoder.cc
65           timer.cc
66           transcode_job.cc
67           transcoder.cc
68           types.cc
69           ui_signaller.cc
70           update.cc
71           util.cc
72           video_content.cc
73           video_decoder.cc
74           writer.cc
75           """
76
77 def build(bld):
78     if bld.env.BUILD_STATIC:
79         obj = bld(features = 'cxx cxxstlib')
80     else:
81         obj = bld(features = 'cxx cxxshlib')
82
83     obj.name = 'libdcpomatic'
84     obj.export_includes = ['..']
85     obj.uselib = """
86                  AVCODEC AVUTIL AVFORMAT AVFILTER SWSCALE SWRESAMPLE 
87                  BOOST_FILESYSTEM BOOST_THREAD BOOST_DATETIME BOOST_SIGNALS2
88                  SNDFILE OPENJPEG POSTPROC TIFF MAGICK SSH DCP CXML GLIB LZMA XML++
89                  CURL ZIP QUICKMAIL PANGOMM CAIROMM
90                  """
91
92     if bld.env.TARGET_OSX:
93         obj.framework = ['IOKit', 'Foundation']
94
95     obj.source = sources + ' version.cc'
96
97     if bld.env.TARGET_WINDOWS:
98         obj.uselib += ' WINSOCK2 BFD DBGHELP IBERTY SHLWAPI MSWSOCK BOOST_LOCALE'
99         obj.source += ' stack.cpp'
100     if bld.env.BUILD_STATIC:
101         obj.uselib += ' XML++'
102
103     obj.target = 'dcpomatic'
104
105     i18n.po_to_mo(os.path.join('src', 'lib'), 'libdcpomatic', bld)
106
107 def pot(bld):
108     i18n.pot(os.path.join('src', 'lib'), sources, 'libdcpomatic')
109
110 def pot_merge(bld):
111     i18n.pot_merge(os.path.join('src', 'lib'), 'libdcpomatic')