Editor zooming: refactor zoom-limiting code into editor::session_gui_extents.
[ardour.git] / libs / widgets / wscript
1 #!/usr/bin/env python
2 from waflib.extras import autowaf as autowaf
3 from waflib import Options
4 from waflib import TaskGen
5 import os
6
7 # Version of this package (even if built as a child)
8 MAJOR = '0'
9 MINOR = '0'
10 MICRO = '0'
11 WIDGETS_VERSION = "%s.%s.%s" % (MAJOR, MINOR, MICRO)
12
13 # Library version (UNIX style major, minor, micro)
14 # major increment <=> incompatible changes
15 # minor increment <=> compatible changes (additions)
16 # micro increment <=> no interface changes
17 WIDGETS_LIB_VERSION = '0.0.0'
18
19 # Variables for 'waf dist'
20 APPNAME = 'widgets'
21 VERSION = WIDGETS_VERSION
22 I18N_PACKAGE = 'libwidgets'
23
24 # Mandatory variables
25 top = '.'
26 out = 'build'
27
28 widgets_sources = [
29         'ardour_button.cc',
30         'ardour_display.cc',
31         'ardour_dropdown.cc',
32         'ardour_fader.cc',
33         'ardour_icon.cc',
34         'ardour_knob.cc',
35         'ardour_spacer.cc',
36         'ardour_spinner.cc',
37         'auto_spin.cc',
38         'barcontroller.cc',
39         'binding_proxy.cc',
40         'eventboxext.cc',
41         'choice.cc',
42         'click_box.cc',
43         'fastmeter.cc',
44         'focus_entry.cc',
45         'pane.cc',
46         'paths_dialog.cc',
47         'popup.cc',
48         'prompter.cc',
49         'scroomer.cc',
50         'searchbar.cc',
51         'slider_controller.cc',
52         'stateful_button.cc',
53         'tabbable.cc',
54         'tearoff.cc',
55         'tooltips.cc',
56         'ui_config.cc',
57 ]
58
59 def options(opt):
60     autowaf.set_options(opt)
61
62 def configure(conf):
63     conf.load ('compiler_cxx')
64     autowaf.configure(conf)
65     autowaf.check_pkg(conf, 'cairomm-1.0', uselib_store='CAIROMM', atleast_version='1.8.4')
66
67 def build(bld):
68     # Library
69     if bld.is_defined ('INTERNAL_SHARED_LIBS'):
70         obj = bld.shlib(features = 'cxx cxxshlib', source=widgets_sources)
71         obj.defines      = [ 'LIBWIDGETS_DLL_EXPORTS=1' ]
72     else:
73         obj = bld.stlib(features = 'cxx cxxstlib', source=widgets_sources)
74         obj.cxxflags     = [ '-fPIC' ]
75         obj.cflags       = [ '-fPIC' ]
76         obj.defines      = [ ]
77
78     obj.export_includes = ['.']
79     obj.includes     = ['.']
80     obj.uselib       = 'SIGCPP CAIROMM GTKMM BOOST XML'
81     obj.use          = [ 'libpbd', 'libgtkmm2ext' ]
82     obj.name         = 'libwidgets'
83     obj.target       = 'widgets'
84     obj.vnum         = WIDGETS_LIB_VERSION
85     obj.install_path = bld.env['LIBDIR']
86     obj.defines      += [ 'PACKAGE="' + I18N_PACKAGE + '"' ]
87
88 def shutdown():
89     autowaf.shutdown()
90