2 # Copyright (C) 2012-2015 Carl Hetherington <cth@carlh.net>
4 # This file is part of DCP-o-matic.
6 # DCP-o-matic is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 2 of the License, or
9 # (at your option) any later version.
11 # DCP-o-matic is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with DCP-o-matic. If not, see <http://www.gnu.org/licenses/>.
22 from waflib import Logs
26 if conf.env.TARGET_WINDOWS:
27 conf.env.append_value('CXXFLAGS', ['-mconsole'])
28 conf.env.append_value('LINKFLAGS', ['-mconsole'])
31 uselib = 'BOOST_THREAD BOOST_DATETIME DCP XMLSEC CXML XMLPP AVFORMAT AVFILTER AVCODEC '
32 uselib += 'AVUTIL SWSCALE POSTPROC CURL BOOST_FILESYSTEM SSH ZIP CAIROMM FONTCONFIG PANGOMM SUB MAGICK SNDFILE SAMPLERATE BOOST_REGEX '
33 uselib += 'ICU NETTLE '
35 if bld.env.TARGET_WINDOWS:
38 for t in ['dcpomatic_cli', 'dcpomatic_server_cli', 'server_test', 'dcpomatic_kdm_cli', 'dcpomatic_create']:
39 obj = bld(features='cxx cxxprogram')
42 obj.use = ['libdcpomatic2']
43 obj.source = '%s.cc' % t
44 obj.target = t.replace('dcpomatic', 'dcpomatic2')
45 if t == 'server_test':
46 obj.install_path = None
48 if not bld.env.DISABLE_GUI:
49 for t in ['dcpomatic', 'dcpomatic_batch', 'dcpomatic_server', 'dcpomatic_kdm']:
50 obj = bld(features='cxx cxxprogram')
52 if bld.env.BUILD_STATIC or bld.env.TARGET_LINUX:
54 obj.uselib += ' WXWIDGETS'
56 obj.use = ['libdcpomatic2', 'libdcpomatic2-wx']
57 obj.source = '%s.cc' % t
58 if bld.env.TARGET_WINDOWS:
59 obj.source += ' ../../platform/windows/%s.rc' % t
60 obj.target = t.replace('dcpomatic', 'dcpomatic2')
62 i18n.po_to_mo(os.path.join('src', 'tools'), 'dcpomatic2', bld)
65 i18n.pot(os.path.join('src', 'tools'), 'dcpomatic.cc dcpomatic_batch.cc dcpomatic_kdm.cc dcpomatic_server.cc', 'dcpomatic')
68 i18n.pot_merge(os.path.join('src', 'tools'), 'dcpomatic')