ef1d1c083f225fc20ba442c09a062cbd03ac2c43
[dcpomatic.git] / src / wx / wscript
1 import os
2
3 sources = """
4           config_dialog.cc
5           dci_metadata_dialog.cc
6           dir_picker_ctrl.cc
7           film_editor.cc
8           film_viewer.cc
9           filter_dialog.cc
10           filter_view.cc
11           gain_calculator_dialog.cc
12           job_manager_view.cc
13           job_wrapper.cc
14           new_film_dialog.cc
15           properties_dialog.cc
16           server_dialog.cc
17           wx_util.cc
18           wx_ui_signaller.cc
19           """
20
21 def configure(conf):
22     conf.check_cfg(package = '', path = conf.options.wx_config, args = '--cppflags --cxxflags --libs', uselib_store = 'WXWIDGETS', mandatory = True)
23
24 def build(bld):
25     if bld.env.STATIC:
26         obj = bld(features = 'cxx cxxstlib')
27     else:
28         obj = bld(features = 'cxx cxxshlib')
29
30     obj.name   = 'libdvdomatic-wx'
31     obj.includes = [ '..' ]
32     obj.export_includes = ['.']
33     obj.uselib = 'WXWIDGETS'
34     obj.use = 'libdvdomatic'
35     obj.source = sources
36     obj.target = 'dvdomatic-wx'
37
38 def pot(bld):
39     s = ""
40     for f in sources.split('\n'):
41         t = f.strip()
42         if len(t) > 0:
43             s += (os.path.join('src', 'wx', t)) + " "
44
45     os.system('xgettext -d libdvdomatic -s --keyword=_ -p build/src/wx -o libdvdomatic-wx.pot %s' % s)