add VelocityDisplayOption enum; indent TrackAutoNamingRule decl. correctly
[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         'barcontroller.cc',
38         'binding_proxy.cc',
39         'eventboxext.cc',
40         'choice.cc',
41         'fastmeter.cc',
42         'focus_entry.cc',
43         'pane.cc',
44         'paths_dialog.cc',
45         'popup.cc',
46         'prompter.cc',
47         'scroomer.cc',
48         'searchbar.cc',
49         'slider_controller.cc',
50         'stateful_button.cc',
51         'tabbable.cc',
52         'tearoff.cc',
53         'tooltips.cc',
54         'ui_config.cc',
55 ]
56
57 def options(opt):
58     autowaf.set_options(opt)
59
60 def configure(conf):
61     conf.load ('compiler_cxx')
62     autowaf.configure(conf)
63     autowaf.check_pkg(conf, 'cairomm-1.0', uselib_store='CAIROMM', atleast_version='1.8.4')
64
65 def build(bld):
66     # Library
67     if bld.is_defined ('INTERNAL_SHARED_LIBS'):
68         obj = bld.shlib(features = 'cxx cxxshlib', source=widgets_sources)
69         obj.defines      = [ 'LIBWIDGETS_DLL_EXPORTS=1' ]
70     else:
71         obj = bld.stlib(features = 'cxx cxxstlib', source=widgets_sources)
72         obj.cxxflags     = [ '-fPIC' ]
73         obj.cflags       = [ '-fPIC' ]
74         obj.defines      = [ ]
75
76     obj.export_includes = ['.']
77     obj.includes     = ['.']
78     obj.uselib       = 'SIGCPP CAIROMM GTKMM BOOST XML'
79     obj.use          = [ 'libpbd', 'libgtkmm2ext' ]
80     obj.name         = 'libwidgets'
81     obj.target       = 'widgets'
82     obj.vnum         = WIDGETS_LIB_VERSION
83     obj.install_path = bld.env['LIBDIR']
84     obj.defines      += [ 'PACKAGE="' + I18N_PACKAGE + '"' ]
85
86 def shutdown():
87     autowaf.shutdown()
88