2 # Copyright (C) 2012-2015 Carl Hetherington <cth@carlh.net>
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 2 of the License, or
7 # (at your option) any later version.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software
16 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 from waflib import Logs
25 if conf.env.TARGET_WINDOWS:
26 conf.env.append_value('CXXFLAGS', ['-mconsole'])
27 conf.env.append_value('LINKFLAGS', ['-mconsole'])
30 uselib = 'BOOST_THREAD BOOST_DATETIME OPENJPEG DCP XMLSEC CXML XMLPP AVFORMAT AVFILTER AVCODEC '
31 uselib += 'AVUTIL SWSCALE POSTPROC CURL BOOST_FILESYSTEM SSH ZIP CAIROMM FONTCONFIG PANGOMM SUB MAGICK SNDFILE BOOST_REGEX '
33 if bld.env.TARGET_WINDOWS:
36 for t in ['dcpomatic_cli', 'dcpomatic_server_cli', 'server_test', 'dcpomatic_kdm', 'dcpomatic_create']:
37 obj = bld(features='cxx cxxprogram')
40 obj.use = ['libdcpomatic2']
41 obj.source = '%s.cc' % t
42 obj.target = t.replace('dcpomatic', 'dcpomatic2')
43 if t == 'server_test':
44 obj.install_path = None
46 if not bld.env.DISABLE_GUI:
47 for t in ['dcpomatic', 'dcpomatic_batch', 'dcpomatic_server']:
48 obj = bld(features='cxx cxxprogram')
50 if bld.env.BUILD_STATIC or bld.env.TARGET_LINUX:
52 obj.uselib += ' WXWIDGETS'
54 obj.use = ['libdcpomatic2', 'libdcpomatic2-wx']
55 obj.source = '%s.cc' % t
56 if bld.env.TARGET_WINDOWS:
57 obj.source += ' ../../platform/windows/dcpomatic.rc'
58 obj.target = t.replace('dcpomatic', 'dcpomatic2')
60 i18n.po_to_mo(os.path.join('src', 'tools'), 'dcpomatic2', bld)
63 i18n.pot(os.path.join('src', 'tools'), 'dcpomatic.cc dcpomatic_batch.cc', 'dcpomatic')
66 i18n.pot_merge(os.path.join('src', 'tools'), 'dcpomatic')