Try to fix windows build.
[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           kdm.cc
36           log.cc
37           moving_image_content.cc
38           moving_image_decoder.cc
39           moving_image_examiner.cc
40           player.cc
41           playlist.cc
42           ratio.cc
43           resampler.cc
44           scp_dcp_job.cc
45           scaler.cc
46           server.cc
47           sndfile_content.cc
48           sndfile_decoder.cc
49           sound_processor.cc
50           still_image_content.cc
51           still_image_decoder.cc
52           still_image_examiner.cc
53           subtitle_content.cc
54           subtitle_decoder.cc
55           timer.cc
56           transcode_job.cc
57           transcoder.cc
58           types.cc
59           ui_signaller.cc
60           util.cc
61           video_content.cc
62           video_decoder.cc
63           writer.cc
64           """
65
66 def build(bld):
67     if bld.env.STATIC:
68         obj = bld(features = 'cxx cxxstlib')
69     else:
70         obj = bld(features = 'cxx cxxshlib')
71
72     obj.name = 'libdcpomatic'
73     obj.export_includes = ['..']
74     obj.uselib = """
75                  AVCODEC AVUTIL AVFORMAT AVFILTER SWSCALE SWRESAMPLE 
76                  BOOST_FILESYSTEM BOOST_THREAD BOOST_DATETIME BOOST_SIGNALS2 
77                  SNDFILE OPENJPEG POSTPROC TIFF MAGICK SSH DCP CXML GLIB LZMA XML++
78                  CURL ZIP QUICKMAIL
79                  """
80
81     obj.source = sources + ' version.cc'
82
83     if bld.env.TARGET_WINDOWS:
84         obj.uselib += ' WINSOCK2 BFD DBGHELP IBERTY SHLWAPI MSWSOCK'
85         obj.source += ' stack.cpp'
86     if bld.env.STATIC:
87         obj.uselib += ' XML++'
88
89     obj.target = 'dcpomatic'
90
91     i18n.po_to_mo(os.path.join('src', 'lib'), 'libdcpomatic', bld)
92
93 def pot(bld):
94     i18n.pot(os.path.join('src', 'lib'), sources, 'libdcpomatic')
95
96 def pot_merge(bld):
97     i18n.pot_merge(os.path.join('src', 'lib'), 'libdcpomatic')