ardour/libs/fst/wscript
Mads Kiilerich 2973e82a90 wscript: sanitize strings from fetch_*_revision_date early instead of applying str() all over
This can perhaps be simplified further when Python2 support is dropped.
2023-10-15 10:47:16 -06:00

76 lines
2.9 KiB
Python

#!/usr/bin/env python
import os
import sys
import re
# needed for code used from libardour
I18N_PACKAGE = 'ardour'
def options(opt):
pass
def configure(conf):
if conf.env['WINDOWS_VST_SUPPORT'] == True:
conf.check(compiler='cxx', lib='gdi32', mandatory=True, uselib_store='GDI32')
def build(bld):
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 = [
'VST3_SCANNER_APP',
'VERSIONSTRING="' + bld.env['VERSION'] + '"',
'PACKAGE="' + I18N_PACKAGE + 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'
if bld.is_defined('HAVE_USB'):
obj.uselib += ' USB'
if sys.platform == 'darwin':
obj.uselib += ' OSX'
if bld.env['build_target'] == 'mingw':
obj.uselib += ' GDI32'
obj.linkflags = ['-mwindows']
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'])
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')
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']
obj.use = [ 'libpbd', 'libtemporal', 'libevoral', 'vstwin' ]
else:
obj.uselib = ['GIOMM', 'DL', 'OSX', 'ARCHIVE', 'CURL', 'XML' ]
obj.use = [ 'libpbd', 'libtemporal', 'libevoral' ]
if bld.is_defined('HAVE_USB'):
obj.uselib += ['USB']
obj.includes = [ '../pbd/', '../ardour/', '.' ]
obj.defines = [
'_POSIX_SOURCE',
'USE_WS_PREFIX',
'VST_SCANNER_APP',
'PACKAGE="' + I18N_PACKAGE + bld.env['MAJOR'] + '"',
'LIBARDOUR="' + bld.env['lwrcase_dirname'] + '"',
'VERSIONSTRING="' + bld.env['VERSION'] + '"',
]
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'])