-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathmeson.build
130 lines (103 loc) · 4.72 KB
/
meson.build
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
128
129
130
##############################################################################
# Copyright (C) 2020- Nils Hilbricht
#
# This file is part of New-Session-Manager
#
# New-Session-Manager is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# New-Session-Manager 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 General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with New-Session-Manager. If not, see <https://www.gnu.org/licenses/>.
##############################################################################
#Please keep the version number in a separate line so we can automatically update it.
#Also keep it at the beginning of the line and leave spaces around the colon.
#It's source is in src/nsmd.cpp #DEFINE VERSION_STRING
project(
'new-session-manager',
'c', 'cpp',
version : '1.6.1',
license : 'GPLv3',
)
##############
#Dependencies
##############
liblodep = dependency('liblo') #and not 'lo'
threaddep = dependency('threads')
jackdep = dependency('jack', required: get_option('jackpatch')) #and not 'libjack'
cc = meson.get_compiler('c')
fltkdep = cc.find_library('fltk', required: get_option('nsm-legacy-gui') or get_option('nsm-proxy'))
fltkimagesdep = cc.find_library('fltk_images', required: get_option('nsm-legacy-gui'))
fluid = find_program('fluid', required: get_option('nsm-proxy'))
##############
#Build Targets
##############
executable('nsmd',
sources: ['src/nsmd.cpp', 'src/debug.cpp', 'src/Endpoint.cpp', 'src/file.cpp', 'src/Thread.cpp'],
dependencies: [liblodep, threaddep],
install: true,
)
install_man(['docs/src/nsmd.1'])
install_data('docs/index.html', install_dir : get_option('datadir') / 'doc/new-session-manager')
install_data('docs/api/index.html', install_dir : get_option('datadir') / 'doc/new-session-manager/api')
install_data('CHANGELOG', install_dir : get_option('datadir') / 'doc/new-session-manager')
install_data('README.md', install_dir : get_option('datadir') / 'doc/new-session-manager')
#For options see meson_options.txt
#All get_options are default=true
if get_option('jackpatch')
executable('jackpatch',
'src/jackpatch.c',
dependencies: [liblodep, jackdep],
install: true,
)
install_data('src/jackpatch.svg', install_dir : get_option('datadir') / 'icons/hicolor/scalable/apps')
install_data('src/org.jackaudio.jackpatch.desktop', install_dir : get_option('datadir') / 'applications')
install_man(['docs/src/jackpatch.1', ])
endif
if get_option('nsm-proxy')
NSM_Proxy_UI_cpp = custom_target(
'NSM_Proxy_UI.cpp',
output : 'NSM_Proxy_UI.C',
input : 'src/NSM_Proxy_UI.fl',
command : [fluid, '-c', '-o', '@OUTPUT@', '@INPUT@'],
)
NSM_Proxy_UI_h = custom_target(
'NSM_Proxy_UI.h',
output : 'NSM_Proxy_UI.H',
input : 'src/NSM_Proxy_UI.fl',
command : [fluid, '-c', '-h', '@OUTPUT@', '@INPUT@'],
)
executable('nsm-proxy',
sources: ['src/nsm-proxy.cpp', 'src/debug.cpp'],
dependencies: [liblodep, threaddep],
install: true,
)
executable('nsm-proxy-gui',
sources: ['src/nsm-proxy-gui.cpp', [NSM_Proxy_UI_cpp, NSM_Proxy_UI_h]],
dependencies: [fltkdep, liblodep, threaddep],
install: true,
)
install_data('src/nsm-proxy.svg', install_dir : get_option('datadir') / 'icons/hicolor/scalable/apps')
install_data('src/org.jackaudio.nsm-proxy.desktop', install_dir : get_option('datadir') / 'applications')
install_man(['docs/src/nsm-proxy.1', 'docs/src/nsm-proxy-gui.1'])
endif
if get_option('nsm-legacy-gui')
executable('nsm-legacy-gui',
sources: ['src/nsm-legacy-gui.cpp', 'src/debug.cpp', 'src/Endpoint.cpp', 'src/Thread.cpp', 'src/FL/Fl_Scalepack.C'],
dependencies: [fltkimagesdep, fltkdep, liblodep, threaddep],
install: true,
)
install_data('src/org.jackaudio.nsm-legacy-gui.desktop', install_dir : get_option('datadir') / 'applications')
install_data('src/nsm-legacy-gui.svg', install_dir : get_option('datadir') / 'icons/hicolor/scalable/apps')
install_man(['docs/src/nsm-legacy-gui.1', 'docs/src/non-session-manager.1'])
#Symlinking is a one-way operation and can't be uninstalled, we rely on distribution packages for that
meson.add_install_script('sh', '-c',
'ln -sf nsm-legacy-gui ${DESTDIR}@0@/@1@/non-session-manager'.format(
get_option('prefix'), get_option('bindir')))
endif