2009-02-25 18:48:10 -05:00
|
|
|
#!/usr/bin/env python
|
|
|
|
import autowaf
|
|
|
|
import os
|
|
|
|
|
|
|
|
# Version of this package (even if built as a child)
|
2009-02-25 21:24:16 -05:00
|
|
|
MAJOR = '0'
|
|
|
|
MINOR = '8'
|
|
|
|
MICRO = '3'
|
|
|
|
GTKMM2EXT_VERSION = "%s.%s.%s" % (MAJOR, MINOR, MICRO)
|
2009-02-25 18:48:10 -05:00
|
|
|
|
|
|
|
# Library version (UNIX style major, minor, micro)
|
|
|
|
# major increment <=> incompatible changes
|
|
|
|
# minor increment <=> compatible changes (additions)
|
|
|
|
# micro increment <=> no interface changes
|
|
|
|
GTKMM2EXT_LIB_VERSION = '0.8.3'
|
|
|
|
|
|
|
|
# Variables for 'waf dist'
|
|
|
|
APPNAME = 'gtkmm2ext'
|
|
|
|
VERSION = GTKMM2EXT_VERSION
|
|
|
|
|
2009-08-08 18:36:32 -04:00
|
|
|
gtkmm2ext_sources = [
|
2009-12-04 15:52:04 -05:00
|
|
|
'actions.cc',
|
2010-08-16 22:48:24 -04:00
|
|
|
'application.cc',
|
2009-08-08 18:36:32 -04:00
|
|
|
'auto_spin.cc',
|
|
|
|
'barcontroller.cc',
|
|
|
|
'binding_proxy.cc',
|
2010-04-06 12:57:35 -04:00
|
|
|
'bindable_button.cc',
|
2010-08-06 15:02:21 -04:00
|
|
|
'bindings.cc',
|
2009-11-21 12:20:57 -05:00
|
|
|
'cell_renderer_pixbuf_multi.cc',
|
2009-08-08 18:36:32 -04:00
|
|
|
'cell_renderer_pixbuf_toggle.cc',
|
|
|
|
'choice.cc',
|
|
|
|
'click_box.cc',
|
|
|
|
'dndtreeview.cc',
|
|
|
|
'fastmeter.cc',
|
|
|
|
'focus_entry.cc',
|
|
|
|
'grouped_buttons.cc',
|
|
|
|
'gtk_ui.cc',
|
2010-03-16 11:33:04 -04:00
|
|
|
'gtkapplication.c',
|
2009-08-08 18:36:32 -04:00
|
|
|
'idle_adjustment.cc',
|
2009-12-04 17:51:32 -05:00
|
|
|
'keyboard.cc',
|
2010-03-10 12:31:16 -05:00
|
|
|
'motionfeedback.cc',
|
2010-05-06 17:02:08 -04:00
|
|
|
'prolooks_helpers.c',
|
2009-08-08 18:36:32 -04:00
|
|
|
'pixfader.cc',
|
|
|
|
'pixscroller.cc',
|
|
|
|
'popup.cc',
|
|
|
|
'prompter.cc',
|
|
|
|
'scroomer.cc',
|
|
|
|
'selector.cc',
|
|
|
|
'slider_controller.cc',
|
|
|
|
'stateful_button.cc',
|
|
|
|
'tearoff.cc',
|
|
|
|
'textviewer.cc',
|
|
|
|
'utils.cc',
|
|
|
|
'version.cc',
|
|
|
|
'window_title.cc'
|
|
|
|
]
|
|
|
|
|
2009-02-25 18:48:10 -05:00
|
|
|
# Mandatory variables
|
|
|
|
srcdir = '.'
|
|
|
|
blddir = 'build'
|
|
|
|
|
2009-02-25 21:24:16 -05:00
|
|
|
path_prefix = 'libs/gtkmm2ext/'
|
|
|
|
|
2009-02-25 18:48:10 -05:00
|
|
|
def set_options(opt):
|
|
|
|
autowaf.set_options(opt)
|
|
|
|
|
|
|
|
def configure(conf):
|
2009-02-25 21:24:16 -05:00
|
|
|
autowaf.build_version_files(path_prefix+'gtkmm2ext/version.h', path_prefix+'version.cc',
|
|
|
|
'libgtkmm2ext', MAJOR, MINOR, MICRO)
|
2009-02-25 18:48:10 -05:00
|
|
|
autowaf.configure(conf)
|
2009-07-22 16:51:13 -04:00
|
|
|
conf.check_tool('compiler_cxx')
|
2009-02-25 18:48:10 -05:00
|
|
|
autowaf.check_pkg(conf, 'gtkmm-2.4', uselib_store='GTKMM', atleast_version='2.8')
|
2009-08-08 18:36:32 -04:00
|
|
|
autowaf.check_pkg(conf, 'gtk+-2.0', uselib_store='GTK', atleast_version='2.12.1')
|
|
|
|
|
2009-02-25 18:48:10 -05:00
|
|
|
|
|
|
|
def build(bld):
|
2009-08-08 18:36:32 -04:00
|
|
|
obj = bld.new_task_gen(features = 'cc cxx cshlib')
|
|
|
|
obj.source = gtkmm2ext_sources
|
2009-02-25 18:48:10 -05:00
|
|
|
obj.export_incdirs = ['.']
|
|
|
|
obj.includes = ['.']
|
|
|
|
obj.name = 'libgtkmm2ext'
|
|
|
|
obj.target = 'gtkmm2ext'
|
2009-08-08 18:36:32 -04:00
|
|
|
obj.uselib = 'GTKMM GTK GTKOSX OSX GDK'
|
2009-02-25 18:48:10 -05:00
|
|
|
obj.uselib_local = 'libpbd'
|
|
|
|
obj.vnum = GTKMM2EXT_LIB_VERSION
|
2009-02-26 23:40:44 -05:00
|
|
|
obj.install_path = os.path.join(bld.env['LIBDIR'], 'ardour3')
|
2009-04-18 12:15:12 -04:00
|
|
|
obj.cxxflags = [
|
|
|
|
'-DPACKAGE="libgtkmm2ext"',
|
|
|
|
'-DLOCALEDIR="' + os.path.join(
|
|
|
|
os.path.normpath(bld.env['DATADIRNAME']), 'locale') + '"']
|
2009-08-08 18:36:32 -04:00
|
|
|
if bld.env['GTKOSX']:
|
2010-03-16 11:33:04 -04:00
|
|
|
obj.source += ['gtkapplication_quartz.mm']
|
|
|
|
else:
|
|
|
|
obj.source += ['gtkapplication_x11.c']
|
2009-02-25 18:48:10 -05:00
|
|
|
|
|
|
|
def shutdown():
|
|
|
|
autowaf.shutdown()
|
|
|
|
|