2014-02-24 23:37:55 -05:00
|
|
|
#!/usr/bin/env python
|
|
|
|
import os
|
|
|
|
import sys
|
|
|
|
import re
|
|
|
|
|
|
|
|
# needed for code used from libardour
|
2015-01-08 10:57:46 -05:00
|
|
|
I18N_PACKAGE = 'ardour'
|
2014-02-24 23:37:55 -05:00
|
|
|
|
|
|
|
def options(opt):
|
2022-01-25 11:43:36 -05:00
|
|
|
pass
|
2014-02-24 23:37:55 -05:00
|
|
|
|
|
|
|
def configure(conf):
|
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')
|
2014-02-24 23:37:55 -05:00
|
|
|
|
|
|
|
def build(bld):
|
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',
|
2022-10-15 08:05:36 -04:00
|
|
|
'VERSIONSTRING="' + bld.env['VERSION'] + '"',
|
2022-10-15 18:59:21 -04:00
|
|
|
'PACKAGE="' + I18N_PACKAGE + bld.env['MAJOR'] + '"',
|
2020-09-10 08:43:05 -04:00
|
|
|
'LIBARDOUR="' + bld.env['lwrcase_dirname'] + '"',
|
|
|
|
'LOCALEDIR="' + os.path.join(os.path.normpath(bld.env['DATADIR']), 'locale') + '"',
|
|
|
|
]
|
2022-11-18 18:47:53 -05:00
|
|
|
obj.use = [ 'libpbd' ]
|
2020-09-17 06:20:31 -04:00
|
|
|
obj.uselib = 'GIOMM DL UUID ARCHIVE CURL XML'
|
2020-09-10 08:43:05 -04:00
|
|
|
|
2023-05-04 15:31:13 -04:00
|
|
|
if bld.is_defined('HAVE_USB'):
|
|
|
|
obj.uselib += ' USB'
|
2020-09-17 06:20:31 -04:00
|
|
|
if sys.platform == 'darwin':
|
|
|
|
obj.uselib += ' OSX'
|
2020-09-10 08:43:05 -04:00
|
|
|
if bld.env['build_target'] == 'mingw':
|
2020-09-17 06:20:31 -04:00
|
|
|
obj.uselib += ' GDI32'
|
2020-09-18 16:37:13 -04:00
|
|
|
obj.linkflags = ['-mwindows']
|
2020-09-10 08:43:05 -04:00
|
|
|
|
|
|
|
if re.search ("bsd", sys.platform) != None:
|
2024-04-04 11:05:18 -04:00
|
|
|
obj.defines.append('_POSIX_C_SOURCE=200809L')
|
2020-09-10 08:43:05 -04:00
|
|
|
obj.defines.append('_XOPEN_SOURCE=700')
|
|
|
|
|
2020-09-18 16:37:13 -04:00
|
|
|
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'):
|
2014-02-24 23:37:55 -05:00
|
|
|
obj = bld (features = 'cxx c cxxprogram')
|
2021-06-03 12:19:18 -04:00
|
|
|
obj.source = ( 'vst2-scanner.cc' )
|
2015-01-17 12:19:25 -05:00
|
|
|
obj.target = 'ardour-vst-scanner'
|
2014-03-04 09:25:58 -05:00
|
|
|
if bld.is_defined('WINDOWS_VST_SUPPORT'):
|
2015-01-17 12:19:25 -05:00
|
|
|
bld (features = 'c', name='vstwin', source='vstwin.c', uselib = 'GIOMM', includes = [ '../pbd/', '../ardour/', '.' ])
|
2021-07-04 08:43:05 -04:00
|
|
|
obj.uselib = ['GIOMM', 'DL', 'GDI32', 'ARCHIVE', 'CURL', 'XML']
|
2015-02-13 22:18:56 -05:00
|
|
|
obj.linkflags = ['-mwindows']
|
2022-11-18 18:47:53 -05:00
|
|
|
obj.use = [ 'libpbd', 'libtemporal', 'libevoral', 'vstwin' ]
|
2014-03-04 09:25:58 -05:00
|
|
|
else:
|
2021-07-04 08:43:05 -04:00
|
|
|
obj.uselib = ['GIOMM', 'DL', 'OSX', 'ARCHIVE', 'CURL', 'XML' ]
|
2022-11-18 18:47:53 -05:00
|
|
|
obj.use = [ 'libpbd', 'libtemporal', 'libevoral' ]
|
2014-02-24 23:37:55 -05:00
|
|
|
|
2023-05-04 15:31:13 -04:00
|
|
|
if bld.is_defined('HAVE_USB'):
|
|
|
|
obj.uselib += ['USB']
|
|
|
|
|
2021-06-03 12:12:29 -04:00
|
|
|
obj.includes = [ '../pbd/', '../ardour/', '.' ]
|
|
|
|
obj.defines = [
|
|
|
|
'_POSIX_SOURCE',
|
|
|
|
'USE_WS_PREFIX',
|
|
|
|
'VST_SCANNER_APP',
|
2022-10-15 18:59:21 -04:00
|
|
|
'PACKAGE="' + I18N_PACKAGE + bld.env['MAJOR'] + '"',
|
2021-06-03 12:12:29 -04:00
|
|
|
'LIBARDOUR="' + bld.env['lwrcase_dirname'] + '"',
|
2022-10-15 08:05:36 -04:00
|
|
|
'VERSIONSTRING="' + 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')
|
2016-09-05 14:14:29 -04:00
|
|
|
|
2021-06-03 12:12:29 -04:00
|
|
|
obj.install_path = os.path.join(bld.env['LIBDIR'])
|