This repository has been archived by the owner on Jan 30, 2024. It is now read-only.
forked from audacious-media-player/audacious-plugins
-
Notifications
You must be signed in to change notification settings - Fork 0
/
meson.build
137 lines (95 loc) · 3.36 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
131
132
133
134
135
136
137
project('audacious-plugins', 'c', 'cpp',
version: '3.11-devel',
meson_version: '>= 0.50')
copyright = 'Copyright (C) 2001-2018 Audacious developers and others'
qt5 = import('qt5')
gnome = import('gnome')
glib_req = '>= 2.32'
glib_dep = dependency('glib-2.0', version: glib_req, required: true)
gmodule_dep = dependency('gmodule-2.0', version: glib_req, required: true)
audacious_req = '>= 3.11'
audacious_dep = dependency('audacious', version: audacious_req, required: true)
# XXX - make this it's own .pc file
audtag_dep = declare_dependency(link_args: [
'-L@0@'.format(audacious_dep.get_pkgconfig_variable('libdir')),
'-laudtag'
])
# XXX - make this it's own .pc file
audqt_dep = declare_dependency(link_args: [
'-L@0@'.format(audacious_dep.get_pkgconfig_variable('libdir')),
'-laudqt'
])
xml_dep = dependency('libxml-2.0')
if get_option('qt')
qt_req = '>= 5.2'
qt_dep = dependency('qt5', version: qt_req, required: true, modules: ['Core', 'Widgets', 'Gui'])
endif
cc = meson.get_compiler('c')
cxx = meson.get_compiler('cpp')
if cc.get_id() == 'gcc' or cc.get_id() == 'clang'
common_flags = [
'-pipe',
'-ffast-math',
'-Wall',
'-Wtype-limits',
'-Wno-stringop-truncation'
]
cxx_flags = [
'-Wno-non-virtual-dtor',
'-Woverloaded-virtual'
]
check_cflags = ['-std=gnu99'] + common_flags
check_cxxflags = ['-std=gnu++11'] + common_flags + cxx_flags
foreach arg : check_cflags
if cc.has_argument(arg)
add_project_arguments(arg, language: 'c')
endif
endforeach
foreach arg : check_cxxflags
if cxx.has_argument(arg)
add_project_arguments(arg, language: 'cpp')
endif
endforeach
endif
conf = configuration_data()
conf.set_quoted('BUILDSTAMP', '???')
conf.set_quoted('COPYRIGHT', copyright)
conf.set_quoted('PACKAGE', meson.project_name())
conf.set_quoted('VERSION', meson.project_version())
conf.set('PACKAGE_VERSION', meson.project_version())
if host_machine.endian() == 'big'
conf.set10('WORDS_BIGENDIAN', true)
endif
# XXX - investigate to see if we can do better
conf.set_quoted('PLUGIN_SUFFIX', '.so')
if host_machine.system() == 'windows'
conf.set_quoted('PLUGIN_SUFFIX', '.dll')
elif host_machine.system() == 'darwin'
conf.set_quoted('PLUGIN_SUFFIX', '.dylib')
endif
if host_machine.system() == 'windows'
conf.set('EXPORT', '__declspec(dllexport)')
conf.set_quoted('PLUGIN_SUFFIX', '.dll')
elif cc.get_id() == 'gcc' or cc.get_id() == 'clang'
add_project_arguments('-fvisibility=hidden', language: 'c')
add_project_arguments('-fvisibility=hidden', language: 'cpp')
conf.set('EXPORT', '__attribute__((visibility("default")))')
endif
install_plugindir = join_paths(get_option('libdir'), 'audacious')
conf.set_quoted('INSTALL_PLUGINDIR', install_plugindir)
conf.set('plugindir', install_plugindir)
container_plugin_dir = join_paths(install_plugindir, 'Container')
effect_plugin_dir = join_paths(install_plugindir, 'Effect')
general_plugin_dir = join_paths(install_plugindir, 'General')
input_plugin_dir = join_paths(install_plugindir, 'Input')
output_plugin_dir = join_paths(install_plugindir, 'Output')
transport_plugin_dir = join_paths(install_plugindir, 'Transport')
visualization_plugin_dir = join_paths(install_plugindir, 'Visualization')
if get_option('dbus')
conf.set10('USE_DBUS', true)
endif
if get_option('qt')
conf.set10('USE_QT', true)
endif
subdir('src')
subdir('po')