Waf: install stuff
[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 # Mandatory variables
22 srcdir = '.'
23 blddir = 'build'
24
25 path_prefix = 'libs/gtkmm2ext/'
26
27 def set_options(opt):
28         autowaf.set_options(opt)
29
30 def configure(conf):
31         autowaf.build_version_files(path_prefix+'gtkmm2ext/version.h', path_prefix+'version.cc',
32                         'libgtkmm2ext', MAJOR, MINOR, MICRO)
33         autowaf.configure(conf)
34         autowaf.check_tool(conf, 'compiler_cxx')
35         autowaf.check_pkg(conf, 'gtkmm-2.4', uselib_store='GTKMM', atleast_version='2.8')
36
37 def build(bld):
38         obj = bld.new_task_gen('cxx', 'shlib')
39         obj.source = '''
40                 auto_spin.cc
41                 barcontroller.cc
42                 binding_proxy.cc
43                 choice.cc
44                 click_box.cc
45                 dndtreeview.cc
46                 fastmeter.cc
47                 focus_entry.cc
48                 grouped_buttons.cc
49                 gtk_ui.cc
50                 idle_adjustment.cc
51                 pixfader.cc
52                 pixscroller.cc
53                 popup.cc
54                 prompter.cc
55                 scroomer.cc
56                 selector.cc
57                 slider_controller.cc
58                 stateful_button.cc
59                 tearoff.cc
60                 textviewer.cc
61                 utils.cc
62                 version.cc
63                 window_title.cc
64         '''
65         obj.export_incdirs = ['.']
66         obj.includes     = ['.']
67         obj.name         = 'libgtkmm2ext'
68         obj.target       = 'gtkmm2ext'
69         obj.uselib       = 'GTKMM'
70         obj.uselib_local = 'libpbd'
71         obj.vnum         = GTKMM2EXT_LIB_VERSION
72         obj.install_path = os.path.join(bld.env['LIBDIR'], 'ardour3')
73         obj.cxxflags     = '-DPACKAGE=\\\"libgtkmm2ext\\\"'
74         obj.cxxflags     += ' -DLOCALEDIR=\\\"' + os.path.join(
75                         os.path.normpath(bld.env['DATADIRNAME']), 'locale') + '\\\"'
76
77 def shutdown():
78         autowaf.shutdown()
79