Build system to package https://github.com/kfoltman/calfbox for the Laborejo Software Suite. No code changes to calfbox. Please do all issues and pull requests upstream.
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.

220 lines
6.8 KiB

2 years ago
##############################################################################
# Copyright (C) 2020- Nils Hilbricht
#License for this build file. This is not the license for calfbox, which is GPL.
#https://www.isc.org/licenses/
#
#Permission to use, copy, modify, and/or distribute this software for any purpose with or without
#fee is hereby granted, provided that the above copyright notice and this permission notice appear
#in all copies.
#
#THE SOFTWARE IS PROVIDED “AS IS” AND ISC DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE
#INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE
#FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
#FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
#ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
##############################################################################
project(
'libcalfbox-lss',
'c',
version : '1.2.0',
2 years ago
license : 'GPLv3',
)
cc = meson.get_compiler('c')
thread_dep = dependency('threads')
jack_dep = dependency('jack', version: '>=1.9.17') #and not 'libjack'
#fluidsynth_dep = dependency('fluidsynth')
2 years ago
sndfile_dep = dependency('sndfile')
glib_dep = dependency('glib-2.0', version: '>=2.6')
uuid_dep = dependency('uuid')
m_dep = cc.find_library('m', required : true) #C build-in math lib
rt_dep = cc.find_library('rt', required : true) #C build-in POSIX real time lib
cflags = ['-D_GNU_SOURCE'] #used in target below
as_version = meson.project_version()
conf = configuration_data()
# Surround the version in quotes to make it a C string
conf.set_quoted('VERSION', as_version)
#Hardcode config.h options that are guaranteed by library dependencies below
#Also set options that are specific to this library version but would be a config in original cbox
conf.set('JACK_ENABLED', 1)
conf.set('JACK_HAS_RENAME', 1)
2 years ago
conf.set('USE_JACK', 1) #Otherwise it will use the embedded version of cbox
conf.set('USE_FLUIDSYNTH', 0) #This draws in a LOT of dependencies. Fluidsynth wants libpulse, libpipewire, portaudio, SDL etc. That is very wasteful!
2 years ago
conf.set('USE_LIBSMF', 0)
conf.set('USE_LIBUSB', 0)
conf.set('USE_NCURSES', 0)
conf.set('USE_PYTHON', 0)
conf.set('USE_NEON', 0)
conf.set('USE_SSE', 0) #upstream said this does very little.
#Dynamic config.h options
conf.set('HAVE_DLFCN_H', cc.has_header('dlfcn.h'))
conf.set('HAVE_INTTYPES_H', cc.has_header('inttypes.h'))
conf.set('HAVE_STDINT_H', cc.has_header('stdint.h'))
conf.set('HAVE_STDIO_H', cc.has_header('stdio.h'))
conf.set('HAVE_STDLIB_H', cc.has_header('stdlib.h'))
conf.set('HAVE_STRINGS_H', cc.has_header('strings.h'))
conf.set('HAVE_STRING_H', cc.has_header('string.h'))
conf.set('HAVE_SYS_STAT_H', cc.has_header('sys/stat.h'))
conf.set('HAVE_SYS_TYPES_H', cc.has_header('sys/types.h'))
conf.set('HAVE_UNISTD_H', cc.has_header('unistd.h'))
configure_file(output : 'config.h', configuration : conf)
libcalfbox_sources = [
'calfbox/app.c',
'calfbox/auxbus.c',
'calfbox/blob.c',
'calfbox/chorus.c',
'calfbox/cmd.c',
'calfbox/compressor.c',
'calfbox/config-api.c',
'calfbox/delay.c',
'calfbox/distortion.c',
'calfbox/dom.c',
'calfbox/engine.c',
'calfbox/eq.c',
'calfbox/errors.c',
'calfbox/fbr.c',
'calfbox/fifo.c',
'calfbox/fluid.c',
'calfbox/fuzz.c',
'calfbox/fxchain.c',
'calfbox/gate.c',
'calfbox/hwcfg.c',
'calfbox/instr.c',
'calfbox/io.c',
'calfbox/jackinput.c',
'calfbox/jackio.c',
'calfbox/layer.c',
'calfbox/limiter.c',
'calfbox/master.c',
'calfbox/meter.c',
'calfbox/midi.c',
'calfbox/mididest.c',
'calfbox/module.c',
'calfbox/pattern.c',
'calfbox/pattern-maker.c',
'calfbox/phaser.c',
'calfbox/prefetch_pipe.c',
'calfbox/recsrc.c',
'calfbox/reverb.c',
'calfbox/rt.c',
'calfbox/sampler.c',
'calfbox/sampler_channel.c',
'calfbox/sampler_gen.c',
'calfbox/sampler_layer.c',
'calfbox/sampler_nif.c',
'calfbox/sampler_prevoice.c',
'calfbox/sampler_prg.c',
'calfbox/sampler_rll.c',
'calfbox/sampler_voice.c',
'calfbox/scene.c',
'calfbox/scripting.c',
'calfbox/seq.c',
'calfbox/seq-adhoc.c',
'calfbox/sfzloader.c',
'calfbox/sfzparser.c',
'calfbox/song.c',
'calfbox/streamplay.c',
'calfbox/streamrec.c',
'calfbox/tarfile.c',
'calfbox/tonectl.c',
'calfbox/tonewheel.c',
'calfbox/track.c',
'calfbox/usbaudio.c',
'calfbox/usbio.c',
'calfbox/usbmidi.c',
'calfbox/usbprobe.c',
'calfbox/wavebank.c'
]
cbox_include = include_directories('calfbox')
libcalfbox = shared_library('calfbox-lss',
libcalfbox_sources,
include_directories : cbox_include,
dependencies : [glib_dep, jack_dep, thread_dep, sndfile_dep, uuid_dep, m_dep, rt_dep],
version : as_version ,
soversion : '1',
2 years ago
c_args : cflags ,
install : true)
libcalfboxstatic = static_library('calfbox-lss-static',
libcalfbox_sources,
include_directories : cbox_include,
dependencies : [glib_dep, jack_dep, thread_dep, sndfile_dep, uuid_dep, m_dep, rt_dep],
c_args : cflags ,
install : true)
executable('sfzload',
sources: ['tools/sfzload.c'],
dependencies: [glib_dep, jack_dep, sndfile_dep],
link_with: libcalfboxstatic,
install: true,
)
#basename -a *.h
install_headers(
meson.current_build_dir()+'/config.h',
'calfbox/app.h',
'calfbox/auxbus.h',
'calfbox/biquad-float.h',
'calfbox/blob.h',
'calfbox/cmd.h',
'calfbox/config-api.h',
'calfbox/dom.h',
'calfbox/dspmath.h',
'calfbox/engine.h',
'calfbox/envelope.h',
'calfbox/eq.h',
'calfbox/errors.h',
'calfbox/fifo.h',
'calfbox/hwcfg.h',
'calfbox/instr.h',
'calfbox/ioenv.h',
'calfbox/io.h',
'calfbox/layer.h',
'calfbox/master.h',
'calfbox/menu.h',
'calfbox/menuitem.h',
'calfbox/meter.h',
'calfbox/mididest.h',
'calfbox/midi.h',
'calfbox/module.h',
'calfbox/onepole-float.h',
'calfbox/onepole-int.h',
'calfbox/pattern.h',
'calfbox/pattern-maker.h',
'calfbox/prefetch_pipe.h',
'calfbox/recsrc.h',
'calfbox/rt.h',
'calfbox/sampler.h',
'calfbox/sampler_impl.h',
'calfbox/sampler_layer.h',
'calfbox/sampler_prg.h',
'calfbox/scene.h',
'calfbox/scripting.h',
'calfbox/seq.h',
'calfbox/sfzloader.h',
'calfbox/sfzparser.h',
'calfbox/song.h',
'calfbox/stm.h',
'calfbox/tarfile.h',
'calfbox/tests.h',
'calfbox/track.h',
'calfbox/ui.h',
'calfbox/usbio_impl.h',
'calfbox/wavebank.h',
preserve_path:false,
subdir:'calfbox',
)