Carla API tester app
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

134 lines
3.4 KiB

# Copyright (C) 2021 Alexandros Theodotou <alex at zrythm dot org>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
project('carla-api-tester', 'c',
version : '0.1',
default_options : [
'warning_level=3',
'c_std=gnu11',
])
prefix = get_option ('prefix')
bindir = prefix / get_option ('bindir')
libdir = prefix / get_option ('libdir')
cc = meson.get_compiler ('c')
os_darwin = false
os_linux = false
os_freebsd = false
os_windows = false
bin_suffix = ''
lib_suffix = '.so'
if host_machine.system() == 'darwin'
os_darwin = true
lib_suffix = '.dylib'
elif host_machine.system() == 'linux'
os_linux = true
elif host_machine.system() == 'freebsd'
os_freebsd = true
elif host_machine.system() == 'windows'
os_windows = true
bin_suffix = '.exe'
lib_suffix = '.dll'
else
error ('unknown host system ' + host_machine.system ())
endif
test_cflags = [
'-Wno-missing-field-initializers',
'-Wno-unused-parameter',
]
cflags = cc.get_supported_arguments (
test_cflags)
add_project_arguments (
cflags,
language: [ 'c' ]
)
cdata = configuration_data ()
cdata.set_quoted (
'ISSUE_TRACKER_URL',
'https://todo.sr.ht/~alextee/zrythm-bug')
cdata.set_quoted (
'CONFIGURE_BINDIR', bindir)
gtk_dep = dependency (
'gtk+-3.0', version: '>=3.22')
carla_host_plugin_dep = dependency (
'carla-host-plugin', version: '>=2.2.91')
carla_bins_dir = get_option ('carla_binaries_dir')
if carla_bins_dir == ''
carla_bins_dir = carla_host_plugin_dep.get_pkgconfig_variable('libdir')
endif
install_data (
find_program (
carla_bins_dir / 'carla-discovery-native.exe',
carla_bins_dir /
'carla-discovery-native').full_path(),
install_dir: bindir)
# install discovery & bridge for 32-bit vst's on
# windows
if os_windows
install_data (
find_program (
carla_bins_dir /
'carla-discovery-win32.exe').full_path(),
install_dir: bindir)
install_data (
find_program (
carla_bins_dir /
'carla-bridge-win32.exe').full_path(),
install_dir: bindir)
endif
# install gnu/linux bridges
bridge_types = [
'native', 'lv2-gtk2', 'lv2-gtk3', 'lv2-qt4',
'lv2-qt5' ]
foreach bridge_type : bridge_types
carla_bridge = find_program (
carla_bins_dir / 'carla-bridge-' + bridge_type,
required: false)
if carla_bridge.found() and (os_linux or os_freebsd)
cdata.set('HAVE_CARLA_BRIDGE_' + bridge_type.underscorify().to_upper(), 1)
install_data (
carla_bridge.full_path(),
install_dir: bindir)
endif
endforeach
config_h = configure_file (
output: 'config.h',
configuration: cdata,
)
exe = executable (
'carla-api-tester.gtk3',
sources: [
config_h,
'carla_api_tester_app.c',
'carla_api_tester.c',
],
dependencies: [
carla_host_plugin_dep,
gtk_dep,
],
install: true)
test ('basic', exe)