meson.build 1.08 KB
Newer Older
Hanspeter Portner's avatar
Hanspeter Portner committed
1 2 3 4 5 6 7 8 9 10 11 12
project('osc2ftdidmx', 'c', default_options : [
	'buildtype=release',
	'warning_level=3',
	'werror=false',
	'b_lto=false',
	'c_std=c11'])

version = run_command('cat', 'VERSION').stdout().strip()

add_project_arguments('-DOSC2FTDIDMX_VERSION="'+version+'"', language : 'c')
add_project_arguments('-D_GNU_SOURCE', language : 'c')

13
osc_inc = include_directories('osc.lv2')
14 15
varchunk_inc = include_directories('varchunk')
incs = [osc_inc, varchunk_inc]
16

Hanspeter Portner's avatar
Hanspeter Portner committed
17 18
cc = meson.get_compiler('c')

19
thread_dep = dependency('threads')
Hanspeter Portner's avatar
Hanspeter Portner committed
20
lv2_dep = dependency('lv2', version : '>=1.14.0')
21
ftdi_dep = dependency('libftdi1', version : '>=1.4', required : false)
Hanspeter Portner's avatar
Hanspeter Portner committed
22
if not ftdi_dep.found()
23 24
	ftdi_dep = dependency('libftdi', version : '>=0.20')
else
Hanspeter Portner's avatar
Hanspeter Portner committed
25 26 27
	add_project_arguments('-DHAVE_LIBFTDI1', language : 'c')
endif

28
deps = [thread_dep, lv2_dep, ftdi_dep]
Hanspeter Portner's avatar
Hanspeter Portner committed
29 30 31 32 33

srcs = ['osc2ftdidmx.c']

executable('osc2ftdidmx',
	srcs,
34
	include_directories : incs,
Hanspeter Portner's avatar
Hanspeter Portner committed
35 36 37 38 39 40 41 42 43
	dependencies : deps,
	install : true)

configure_file(
	input : 'osc2ftdidmx.1',
	output : 'osc2ftdidmx.1',
	copy : true)

install_man(join_paths(meson.current_build_dir(), 'osc2ftdidmx.1'))