1ad1aa9cbfd88ccfc033424603cbe3365bda2ad4
[dcpomatic.git] / src / wx / wscript
1 import os
2 import glob
3 from waflib import Logs
4 import i18n
5
6 sources = """
7           about_dialog.cc
8           audio_dialog.cc
9           audio_plot.cc
10           config_dialog.cc
11           dci_metadata_dialog.cc
12           dir_picker_ctrl.cc
13           film_editor.cc
14           film_viewer.cc
15           filter_dialog.cc
16           filter_view.cc
17           gain_calculator_dialog.cc
18           job_manager_view.cc
19           job_wrapper.cc
20           new_film_dialog.cc
21           properties_dialog.cc
22           server_dialog.cc
23           wx_util.cc
24           wx_ui_signaller.cc
25           """
26
27 def configure(conf):
28     conf.check_cfg(msg='Checking for wxWidgets', package='', path=conf.options.wx_config,
29                    args='--cppflags --cxxflags --libs', uselib_store='WXWIDGETS', mandatory=True)
30     conf.in_msg = 1
31     wx_version = conf.check_cfg(package='', path=conf.options.wx_config, args='--version').strip()
32     conf.im_msg = 0
33     if wx_version != '2.9.4':
34         conf.fatal('wxwidgets version 2.9.4 is required; %s found' % wx_version)
35
36 def build(bld):
37     if bld.env.STATIC:
38         obj = bld(features = 'cxx cxxstlib')
39     else:
40         obj = bld(features = 'cxx cxxshlib')
41
42     obj.name   = 'libdvdomatic-wx'
43     obj.includes = [ '..' ]
44     obj.export_includes = ['.']
45     obj.uselib = 'WXWIDGETS'
46     obj.use = 'libdvdomatic'
47     obj.source = sources
48     obj.target = 'dvdomatic-wx'
49
50     i18n.po_to_mo(os.path.join('src', 'wx'), 'libdvdomatic-wx', bld)
51
52 def pot(bld):
53     i18n.pot(os.path.join('src', 'wx'), sources, 'libdvdomatic-wx')
54
55 def pot_merge(bld):
56     i18n.pot_merge(os.path.join('src', 'wx'), 'libdvdomatic-wx')