switch ActionManager to a namespace; move generic part into libgtkmm2ext
[ardour.git] / libs / gtkmm2ext / wscript
1 #!/usr/bin/env python
2 import autowaf
3 import os
4
5 # Version of this package (even if built as a child)
6 MAJOR = '0'
7 MINOR = '8'
8 MICRO = '3'
9 GTKMM2EXT_VERSION = "%s.%s.%s" % (MAJOR, MINOR, MICRO)
10
11 # Library version (UNIX style major, minor, micro)
12 # major increment <=> incompatible changes
13 # minor increment <=> compatible changes (additions)
14 # micro increment <=> no interface changes
15 GTKMM2EXT_LIB_VERSION = '0.8.3'
16
17 # Variables for 'waf dist'
18 APPNAME = 'gtkmm2ext'
19 VERSION = GTKMM2EXT_VERSION
20
21 gtkmm2ext_sources = [
22         'actions.cc',
23         'auto_spin.cc',
24         'barcontroller.cc',
25         'binding_proxy.cc',
26         'cell_renderer_pixbuf_multi.cc',
27         'cell_renderer_pixbuf_toggle.cc',
28         'choice.cc',
29         'click_box.cc',
30         'dndtreeview.cc',
31         'fastmeter.cc',
32         'focus_entry.cc',
33         'grouped_buttons.cc',
34         'gtk_ui.cc',
35         'idle_adjustment.cc',
36         'pixfader.cc',
37         'pixscroller.cc',
38         'popup.cc',
39         'prompter.cc',
40         'scroomer.cc',
41         'selector.cc',
42         'slider_controller.cc',
43         'stateful_button.cc',
44         'tearoff.cc',
45         'textviewer.cc',
46         'utils.cc',
47         'version.cc',
48         'window_title.cc'
49 ]
50
51 # Mandatory variables
52 srcdir = '.'
53 blddir = 'build'
54
55 path_prefix = 'libs/gtkmm2ext/'
56
57 def set_options(opt):
58         autowaf.set_options(opt)
59
60 def configure(conf):
61         autowaf.build_version_files(path_prefix+'gtkmm2ext/version.h', path_prefix+'version.cc',
62                         'libgtkmm2ext', MAJOR, MINOR, MICRO)
63         autowaf.configure(conf)
64         conf.check_tool('compiler_cxx')
65         autowaf.check_pkg(conf, 'gtkmm-2.4', uselib_store='GTKMM', atleast_version='2.8')
66         autowaf.check_pkg(conf, 'gtk+-2.0', uselib_store='GTK', atleast_version='2.12.1')
67
68
69 def build(bld):
70         obj = bld.new_task_gen(features = 'cc cxx cshlib')
71         obj.source = gtkmm2ext_sources
72         obj.export_incdirs = ['.']
73         obj.includes     = ['.']
74         obj.name         = 'libgtkmm2ext'
75         obj.target       = 'gtkmm2ext'
76         obj.uselib       = 'GTKMM GTK GTKOSX OSX GDK'
77         obj.uselib_local = 'libpbd'
78         obj.vnum         = GTKMM2EXT_LIB_VERSION
79         obj.install_path = os.path.join(bld.env['LIBDIR'], 'ardour3')
80         obj.cxxflags     = [
81                         '-DPACKAGE="libgtkmm2ext"',
82                         '-DLOCALEDIR="' + os.path.join(
83                                 os.path.normpath(bld.env['DATADIRNAME']), 'locale') + '"']
84         if bld.env['GTKOSX']:
85                 obj.source      += ['sync-menu.c']
86
87 def shutdown():
88         autowaf.shutdown()
89