13
0
livetrax/libs/gtkmm2ext/wscript
David Robillard 723ab60b39 Upgrade to waf 1.6.7 and autowaf r52.
git-svn-id: svn://localhost/ardour2/branches/3.0@10162 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-09-29 19:17:54 +00:00

113 lines
3.2 KiB
Python

#!/usr/bin/env python
from waflib.extras import autowaf as autowaf
import os
# Version of this package (even if built as a child)
MAJOR = '0'
MINOR = '8'
MICRO = '3'
GTKMM2EXT_VERSION = "%s.%s.%s" % (MAJOR, MINOR, MICRO)
# 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
gtkmm2ext_sources = [
'actions.cc',
'application.cc',
'auto_spin.cc',
'barcontroller.cc',
'binding_proxy.cc',
'bindable_button.cc',
'bindings.cc',
'cairocell.cc',
'cell_renderer_pixbuf_multi.cc',
'cell_renderer_pixbuf_toggle.cc',
'choice.cc',
'click_box.cc',
'debug.cc',
'dndtreeview.cc',
'fastmeter.cc',
'focus_entry.cc',
'grouped_buttons.cc',
'gtk_ui.cc',
'gtkapplication.c',
'idle_adjustment.cc',
'keyboard.cc',
'motionfeedback.cc',
'prolooks_helpers.c',
'pixfader.cc',
'pixscroller.cc',
'popup.cc',
'prompter.cc',
'scroomer.cc',
'selector.cc',
'slider_controller.cc',
'stateful_button.cc',
'tearoff.cc',
'textviewer.cc',
'treeutils.cc',
'utils.cc',
'version.cc',
'window_title.cc'
]
# Mandatory variables
top = '.'
out = 'build'
path_prefix = 'libs/gtkmm2ext/'
def options(opt):
autowaf.set_options(opt)
def configure(conf):
autowaf.build_version_files(path_prefix+'gtkmm2ext/version.h', path_prefix+'version.cc',
'libgtkmm2ext', MAJOR, MINOR, MICRO)
autowaf.configure(conf)
conf.check_tool('compiler_cxx')
autowaf.check_pkg(conf, 'gtkmm-2.4', uselib_store='GTKMM', atleast_version='2.8')
autowaf.check_pkg(conf, 'gtk+-2.0', uselib_store='GTK', atleast_version='2.12.1')
def build(bld):
obj = bld(features = 'c cxx cxxshlib cshlib')
obj.source = gtkmm2ext_sources
obj.export_includes = ['.']
obj.includes = ['.']
obj.name = 'libgtkmm2ext'
obj.target = 'gtkmm2ext'
obj.uselib = 'GTKMM GTK GTKOSX OSX GDK'
obj.use = 'libpbd'
obj.vnum = GTKMM2EXT_LIB_VERSION
obj.install_path = os.path.join(bld.env['LIBDIR'], 'ardour3')
obj.cxxflags = [
'-DPACKAGE="libgtkmm2ext"',
'-DLOCALEDIR="' + os.path.join(
os.path.normpath(bld.env['DATADIR']), 'locale') + '"']
if bld.env['GTKOSX']:
obj.source += ['gtkapplication_quartz.mm']
else:
obj.source += ['gtkapplication_x11.c']
# i18n
if bld.env['ENABLE_NLS']:
mo_files = bld.path.ant_glob ('po/*.mo')
for mo in mo_files:
lang = os.path.basename (mo).replace ('.mo', '')
bld.install_as (os.path.join(bld.env['PREFIX'], 'share', 'locale',
lang, 'LC_MESSAGES', 'libgtkmm2ext.mo'),
mo)
def i18n(bld):
autowaf.build_i18n(bld, '.', 'libs/gtkmm2ext', APPNAME, gtkmm2ext_sources)
def shutdown():
autowaf.shutdown()