diff options
author | Robin Gareus <robin@gareus.org> | 2020-03-26 19:00:11 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2020-03-26 19:00:41 +0100 |
commit | e219a6cd1e786dd8a8daa6e6da28953ae3705fcb (patch) | |
tree | 5a3a17f7e585355ded4f14f1d70419614335bad8 /luasession/wscript | |
parent | e7cdc91770f4c5fd29479d05d1a1a265737399b8 (diff) |
Source-tree consistency (headless tools at top-level)
This move ardour-lua session tool to top-level, next to
headless/hardev.
Diffstat (limited to 'luasession/wscript')
-rwxr-xr-x | luasession/wscript | 91 |
1 files changed, 91 insertions, 0 deletions
diff --git a/luasession/wscript b/luasession/wscript new file mode 100755 index 0000000000..6fe8aac057 --- /dev/null +++ b/luasession/wscript @@ -0,0 +1,91 @@ +#!/usr/bin/env python +from waflib.extras import autowaf as autowaf +from waflib import Options, TaskGen +import waflib.Logs as Logs, waflib.Utils as Utils +import os +import shutil +import sys +import re +import time +from waflib.Task import Task + +top = '.' +out = 'build' + +def options(opt): + autowaf.set_options(opt) + +def configure(conf): + conf.load('misc') + conf.load('compiler_cxx') + conf.check_cc( + header_name='stdio.h readline/readline.h', + lib='readline', + uselib_store='READLINE', + define_name='HAVE_READLINE', + mandatory=False) + autowaf.configure(conf) + +def build(bld): + VERSION = "%s.%s" % (bld.env['MAJOR'], bld.env['MINOR']) + if not bld.is_defined('HAVE_READLINE'): + return; + # no wine + if bld.is_defined('WINDOWS_VST_SUPPORT') and bld.env['build_target'] != 'mingw': + return + + # commandline luasession wrapper script + if bld.env['build_target'] != 'mingw': + obj = bld(features = 'subst') + obj.source = 'ardour-lua.sh.in' + obj.target = 'ardour' + str (bld.env['MAJOR']) + '-lua' + obj.chmod = Utils.O755 + obj.install_path = bld.env['BINDIR'] + obj.LIBDIR = os.path.normpath(bld.env['DLLDIR']) + obj.DATADIR = os.path.normpath(bld.env['DATADIR']) + obj.CONFDIR = os.path.normpath(bld.env['CONFDIR']) + + # commandline luasession + obj = bld (features = 'cxx c cxxprogram') + obj.source = 'luasession.cc' + obj.target = 'luasession' + obj.includes = ['../libs'] + obj.use = ['liblua' + 'libpbd', + 'libardour', + 'libardour_cp', + 'libtemporal', + 'libmidipp', + ] + obj.defines = [ + 'VERSIONSTRING="' + str(bld.env['VERSION']) + '"', + 'DATA_DIR="' + os.path.normpath(bld.env['DATADIR']) + '"', + 'CONFIG_DIR="' + os.path.normpath(bld.env['SYSCONFDIR']) + '"', + 'LOCALEDIR="' + os.path.join(os.path.normpath(bld.env['DATADIR']), 'locale') + '"', + 'PACKAGE="' + "ARDOURUTILS" + '"', + ] + + obj.uselib = 'UUID FLAC FONTCONFIG GLIBMM GIOMM GTHREAD OGG CURL DL XML' + obj.uselib += ' AUDIOUNITS OSX LO ' + obj.uselib += ' READLINE ' + obj.uselib += ' FFTW3F LO TAGLIB LILV RUBBERBAND AUBIO LRDF ARCHIVE VAMPSDK VAMPHOSTSDK' + + if bld.is_defined('HAVE_SUIL'): + obj.uselib += ' SUIL' + + if sys.platform == 'darwin': + obj.uselib += ' AUDIOUNITS OSX' + obj.use += ' libappleutility' + + #if bld.env['build_target'] == 'mingw': + # if bld.env['DEBUG'] == False: + # obj.linkflags = ['-mwindows'] + + if bld.is_defined('NEED_INTL'): + obj.linkflags = ' -lintl' + + if bld.env['build_target'] == 'mingw': + obj.install_path = bld.env['BINDIR'] + obj.target = 'ardour' + str (bld.env['MAJOR']) + '-lua' + else: + obj.install_path = bld.env['DLLDIR'] |