13
0
livetrax/libs/fst/wscript

85 lines
3.1 KiB
Plaintext
Raw Normal View History

#!/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
# Mandatory variables
top = '.'
out = 'build'
# needed for code used from libardour
I18N_PACKAGE = 'ardour'
def options(opt):
autowaf.set_options(opt)
def configure(conf):
conf.load('misc')
2021-06-03 12:12:29 -04:00
if conf.env['WINDOWS_VST_SUPPORT'] == True:
conf.check(compiler='cxx', lib='gdi32', mandatory=True, uselib_store='GDI32')
def build(bld):
VERSION = "%s.%s" % (bld.env['MAJOR'], bld.env['MINOR'])
2020-09-10 08:43:05 -04:00
if bld.is_defined('VST3_SUPPORT'):
obj = bld (features = 'cxx c cxxprogram')
obj.source = 'vst3-scanner.cc'
obj.target = 'ardour-vst3-scanner'
obj.includes = [ '../pbd/', '../ardour/', '../vst3/', '..' ]
obj.defines = [
2020-10-15 14:40:35 -04:00
'VST3_SCANNER_APP',
2020-09-10 08:43:05 -04:00
'VERSIONSTRING="' + str(bld.env['VERSION']) + '"',
'PACKAGE="' + I18N_PACKAGE + str(bld.env['MAJOR']) + '"',
'LIBARDOUR="' + bld.env['lwrcase_dirname'] + '"',
'LOCALEDIR="' + os.path.join(os.path.normpath(bld.env['DATADIR']), 'locale') + '"',
]
obj.use = [ 'libpbd' ]
obj.uselib = 'GIOMM DL UUID ARCHIVE CURL XML'
2020-09-10 08:43:05 -04:00
if sys.platform == 'darwin':
obj.uselib += ' OSX'
2020-09-10 08:43:05 -04:00
if bld.env['build_target'] == 'mingw':
obj.uselib += ' GDI32'
obj.linkflags = ['-mwindows']
2020-09-10 08:43:05 -04:00
if re.search ("bsd", sys.platform) != None:
obj.defines.append('_POSIX_C_SOURCE=200809')
obj.defines.append('_XOPEN_SOURCE=700')
obj.install_path = os.path.join(bld.env['LIBDIR'])
2020-09-10 08:43:05 -04:00
2021-06-03 12:12:29 -04:00
if bld.is_defined('WINDOWS_VST_SUPPORT') or bld.is_defined('LXVST_SUPPORT') or bld.is_defined ('MACVST_SUPPORT'):
obj = bld (features = 'cxx c cxxprogram')
2021-06-03 12:19:18 -04:00
obj.source = ( 'vst2-scanner.cc' )
obj.target = 'ardour-vst-scanner'
if bld.is_defined('WINDOWS_VST_SUPPORT'):
bld (features = 'c', name='vstwin', source='vstwin.c', uselib = 'GIOMM', includes = [ '../pbd/', '../ardour/', '.' ])
obj.uselib = ['GIOMM', 'DL', 'GDI32', 'ARCHIVE', 'CURL', 'XML']
obj.linkflags = ['-mwindows']
2021-06-03 12:19:18 -04:00
obj.use = [ 'libpbd', 'libtemporal', 'libevoral', 'vstwin' ]
else:
obj.uselib = ['GIOMM', 'DL', 'OSX', 'ARCHIVE', 'CURL', 'XML' ]
2021-06-03 12:19:18 -04:00
obj.use = [ 'libpbd', 'libtemporal', 'libevoral' ]
2021-06-03 12:12:29 -04:00
obj.includes = [ '../pbd/', '../ardour/', '.' ]
obj.defines = [
'_POSIX_SOURCE',
'USE_WS_PREFIX',
'VST_SCANNER_APP',
'PACKAGE="' + I18N_PACKAGE + str(bld.env['MAJOR']) + '"',
'LIBARDOUR="' + bld.env['lwrcase_dirname'] + '"',
2021-06-03 12:19:18 -04:00
'VERSIONSTRING="' + str(bld.env['VERSION']) + '"',
2021-06-03 12:12:29 -04:00
]
if re.search ("bsd", sys.platform) != None:
obj.defines.append('_POSIX_C_SOURCE=200809')
obj.defines.append('_XOPEN_SOURCE=700')
2021-06-03 12:12:29 -04:00
obj.install_path = os.path.join(bld.env['LIBDIR'])