Split timing panel into its own class.
[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_mapping_view.cc
10           audio_plot.cc
11           config_dialog.cc
12           content_menu.cc
13           dci_metadata_dialog.cc
14           dir_picker_ctrl.cc
15           film_editor.cc
16           film_editor_panel.cc
17           film_viewer.cc
18           filter_dialog.cc
19           filter_view.cc
20           gain_calculator_dialog.cc
21           job_manager_view.cc
22           job_wrapper.cc
23           new_film_dialog.cc
24           properties_dialog.cc
25           repeat_dialog.cc
26           server_dialog.cc
27           timecode.cc
28           timeline.cc
29           timeline_dialog.cc
30           timing_panel.cc
31           wx_util.cc
32           wx_ui_signaller.cc
33           """
34
35 def configure(conf):
36     args = '--cppflags --cxxflags'
37     if not conf.env.STATIC:
38         args += ' --libs'
39
40     conf.check_cfg(msg='Checking for wxWidgets', package='', path=conf.options.wx_config, args=args,
41                    uselib_store='WXWIDGETS', mandatory=True)
42
43     if conf.env.STATIC:
44         # wx-config returns its static libraries as full paths, without -l prefixes, which confuses
45         # check_cfg(), so just hard-code it all.
46         conf.env.STLIB_WXWIDGETS = ['wx_gtk2u_xrc-2.9', 'wx_gtk2u_qa-2.9', 'wx_baseu_net-2.9', 'wx_gtk2u_html-2.9',
47                                     'wx_gtk2u_adv-2.9', 'wx_gtk2u_core-2.9', 'wx_baseu_xml-2.9', 'wx_baseu-2.9']
48         conf.env.LIB_WXWIDGETS = ['tiff', 'SM', 'dl', 'jpeg', 'png', 'X11']
49  
50     conf.in_msg = 1
51     wx_version = conf.check_cfg(package='', path=conf.options.wx_config, args='--version').strip()
52     conf.im_msg = 0
53     if wx_version != '2.9.4':
54         conf.fatal('wxwidgets version 2.9.4 is required; %s found' % wx_version)
55
56 def build(bld):
57     if bld.env.STATIC:
58         obj = bld(features = 'cxx cxxstlib')
59     else:
60         obj = bld(features = 'cxx cxxshlib')
61
62     obj.name   = 'libdcpomatic-wx'
63 #    obj.includes = [ '..' ]
64     obj.export_includes = ['..']
65     obj.uselib = 'WXWIDGETS'
66     if bld.env.TARGET_LINUX:
67         obj.uselib += ' GTK'
68     obj.use = 'libdcpomatic'
69     obj.source = sources
70     obj.target = 'dcpomatic-wx'
71
72     i18n.po_to_mo(os.path.join('src', 'wx'), 'libdcpomatic-wx', bld)
73
74 def pot(bld):
75     i18n.pot(os.path.join('src', 'wx'), sources, 'libdcpomatic-wx')
76
77 def pot_merge(bld):
78     i18n.pot_merge(os.path.join('src', 'wx'), 'libdcpomatic-wx')