aboutsummaryrefslogtreecommitdiff
path: root/plugins/meson.build
blob: 1c7bd202ac4b82118e9e686de374552f3942c845 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
dsp_srcs = ['synthpod_lv2.c',
	'synthpod_control2cv.c',
	'synthpod_cv2control.c',
	'synthpod_heavyload.c',
	'synthpod_keyboard.c',
	'synthpod_midisplitter.c',
	'synthpod_panic.c',
	'synthpod_placeholder.c',
	'synthpod_stereo.c']

nk_deps = [m_dep, rt_dep, thread_dep, lv2_dep, lilv_dep, cairo_dep]
nk_srcs = ['synthpod_lv2_nk.c',
	'synthpod_keyboard_nk.c',
	'synthpod_common_nk.c']

ui_deps = [m_dep, rt_dep, thread_dep, lv2_dep, lilv_dep, d2tk_dep]
ui_srcs = ['synthpod_lv2_d2tk.c',
	'synthpod_common_d2tk.c']

dsp = shared_module('synthpod', dsp_srcs,
	c_args : c_args,
	include_directories : bin_incs,
	name_prefix : '',
	dependencies : bin_deps,
	link_with : [app, sbox_master],
	install : true,
	install_dir : plug_dir)

suffix = dsp.full_path().strip().split('.')[-1]
conf_data.set('MODULE_SUFFIX', '.' + suffix)
	
if host_machine.system() == 'linux'
	conf_data.set('UI_TYPE', 'X11UI')
	nk_deps += gl_dep
	nk_deps += x11_dep
	nk_deps += xext_dep
	nk_srcs += join_paths('..', 'pugl', 'pugl', 'pugl_x11.c')
elif host_machine.system() == 'windows'
	add_languages('cpp')
	conf_data.set('UI_TYPE', 'WindowsUI')
	nk_deps += cc.find_library('opengl32')
	nk_deps += cc.find_library('gdi32')
	nk_deps += cc.find_library('user32')
	nk_srcs += join_paths('..', 'pugl', 'pugl', 'pugl_win.cpp')
elif host_machine.system() == 'darwin'
	#add_languages('objc')
	conf_data.set('UI_TYPE', 'CocoaUI')
	#nk_deps += cc.find_library('Cocoa')
	#nk_deps += cc.find_library('gl')
	#nk_deps += dependency('appleframeworks', modules : 'cocoa')
	#nk_srcs += join_paths('..', 'pugl', 'pugl', 'pugl_osx.m')
endif

if use_x11
	nk = shared_module('synthpod_nk', nk_srcs,
		c_args : c_args,
		include_directories : bin_incs,
		name_prefix : '',
		dependencies : nk_deps,
		link_with : [sbox_master],
		install : true,
		install_dir : plug_dir)

	ui = shared_module('synthpod_ui', ui_srcs,
		c_args : c_args,
		include_directories : bin_incs,
		name_prefix : '',
		dependencies : ui_deps,
		link_with : [sbox_master],
		install : true,
		install_dir : plug_dir)

	configure_file(
		input : join_paths('..', 'subprojects', 'd2tk', 'nanovg', 'example', 'Roboto-Bold.ttf'),
		output : 'Roboto-Bold.ttf',
		copy : true,
		install : true,
		install_dir : plug_dir)

	configure_file (
		input : 'synthpod_ui.ttl',
		output : 'synthpod_ui.ttl',
		copy : true,
		install : true,
		install_dir : plug_dir)
endif

configure_file(
	input : 'manifest.ttl.in',
	output : 'manifest.ttl',
	configuration : conf_data,
	install : true,
	install_dir : plug_dir)

configure_file(
	input : 'synthpod.ttl',
	output : 'synthpod.ttl',
	copy : true,
	install : true,
	install_dir : plug_dir)

#FIXME paths
install_data('../data/font/Abel-Regular.ttf', install_dir : plug_dir)

install_data('../data/pix/audio.png', install_dir : plug_dir )
install_data('../data/pix/control.png', install_dir : plug_dir )
install_data('../data/pix/cv.png', install_dir : plug_dir )
install_data('../data/pix/event.png', install_dir : plug_dir )
install_data('../data/pix/event_inverted.png', install_dir : plug_dir )
install_data('../data/pix/atom.png', install_dir : plug_dir )
install_data('../data/pix/atom_inverted.png', install_dir : plug_dir )

install_data('../data/pix/midi.png', install_dir : plug_dir )
install_data('../data/pix/osc.png', install_dir : plug_dir )
install_data('../data/pix/time.png', install_dir : plug_dir )
install_data('../data/pix/patch.png', install_dir : plug_dir )
install_data('../data/pix/xpress.png', install_dir : plug_dir )
install_data('../data/pix/automaton.png', install_dir : plug_dir )

install_data('../data/png/plus.png', install_dir : plug_dir )
install_data('../data/png/download.png', install_dir : plug_dir )
install_data('../data/png/cancel.png', install_dir : plug_dir )
install_data('../data/png/house.png', install_dir : plug_dir )
install_data('../data/png/layers.png', install_dir : plug_dir )
install_data('../data/png/user.png', install_dir : plug_dir )
install_data('../data/png/settings.png', install_dir : plug_dir )
install_data('../data/png/menu.png', install_dir : plug_dir )