Skip to content

Commit 5c03755

Browse files
committed
setup basic project
1 parent e6bb872 commit 5c03755

File tree

8 files changed

+838
-5
lines changed

8 files changed

+838
-5
lines changed

.gitignore

Whitespace-only changes.

COPYING

+661
Large diffs are not rendered by default.

README.md

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Passthrough GTK4
2+
================
3+
4+
A passthrough plugin for testing GTK4 LV2 plugins.
5+
6+
# License
7+
8+
GNU AGPL version 3 or later

meson.build

+121-5
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,124 @@
1-
project('passthrough-gtk4', 'c',
1+
# Copyright (C) 2022 Alexandros Theodotou <alex at zrythm dot org>
2+
#
3+
# This program is free software: you can redistribute it and/or modify
4+
# it under the terms of the GNU Affero General Public License as published by
5+
# the Free Software Foundation, either version 3 of the License, or
6+
# (at your option) any later version.
7+
#
8+
# This program is distributed in the hope that it will be useful,
9+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
10+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+
# GNU Affero General Public License for more details.
12+
#
13+
# You should have received a copy of the GNU Affero General Public License
14+
# along with this program. If not, see <https://www.gnu.org/licenses/>.
15+
16+
project (
17+
'passthrough-gtk4', 'c',
218
version : '0.1',
3-
default_options : ['warning_level=3'])
19+
default_options : ['warning_level=2'])
20+
21+
# === Options ===
22+
prefix = get_option('prefix')
23+
lv2dir = prefix / get_option('lv2dir')
24+
25+
# === Detect OS ===
26+
os_darwin = false
27+
os_linux = false
28+
os_freebsd = false
29+
os_windows = false
30+
31+
if host_machine.system() == 'darwin'
32+
os_darwin = true
33+
elif host_machine.system() == 'linux'
34+
os_linux = true
35+
elif host_machine.system() == 'freebsd'
36+
os_freebsd = true
37+
elif host_machine.system() == 'windows'
38+
os_windows = true
39+
endif
40+
41+
# === Dependencies ===
42+
lv2_dep = dependency (
43+
'lv2', version: '>=1.16.0')
44+
gtk_dep = dependency (
45+
'gtk4', version: '>=4',
46+
fallback: ['gtk4', 'libgtk_dep'],
47+
default_options: [
48+
'demos=false', 'build-examples=false',
49+
'build-tests=false',
50+
'media-gstreamer=disabled',
51+
'introspection=disabled'])
52+
53+
# === CFlags ===
54+
cc = meson.get_compiler ('c')
455

5-
exe = executable('passthrough_gtk4', 'passthrough_gtk4.c',
6-
install : true)
56+
common_cflags = cc.get_supported_arguments ([
57+
'-fvisibility=hidden',
58+
'-Wformat=2',
59+
'-Wno-missing-field-initializers',
60+
'-Wno-unused-parameter',
61+
'-Wno-sequence-point',
62+
'-Wignored-qualifiers',
63+
'-Wno-cast-function-type',
64+
])
65+
if get_option ('strict_flags')
66+
common_cflags += cc.get_supported_arguments([
67+
'-Werror=clobbered',
68+
'-Werror=disabled-optimization',
69+
'-Werror=double-promotion',
70+
'-Werror=float-equal',
71+
'-Werror=logical-op',
72+
'-Werror=pointer-arith',
73+
'-Werror=sign-conversion',
74+
'-Werror=overlength-strings',
75+
'-Werror=stringop-truncation',
76+
'-Werror=missing-declarations',
77+
'-Werror=shadow',
78+
'-Werror=undef',
79+
'-Werror=unused',
80+
'-Werror=strict-aliasing',
81+
'-fstrict-aliasing',
82+
'-Wstrict-overflow=2',
83+
'-fstrict-overflow',
84+
'-Werror=duplicated-branches',
85+
'-Werror=duplicated-cond',
86+
'-Werror=null-dereference',
87+
'-Werror=init-self',
88+
'-Werror=jump-misses-init',
89+
'-Werror=missing-prototypes',
90+
'-Werror=nested-externs',
91+
'-Werror=write-strings',
92+
'-Werror=implicit-fallthrough',
93+
'-Werror=sign-compare',
94+
'-Werror=discarded-qualifiers',
95+
'-Werror=float-conversion',
96+
'-Werror=implicit-function-declaration',
97+
'-Werror=uninitialized',
98+
'-Werror=maybe-uninitialized',
99+
'-Werror=return-type',
100+
'-Werror=int-conversion',
101+
'-Werror=format-security',
102+
'-Werror=incompatible-pointer-types',
103+
'-Werror=implicit-int',
104+
'-Werror=multistatement-macros',
105+
'-Werror=switch',
106+
'-Werror=overflow',
107+
'-Werror=array-bounds',
108+
'-Werror=enum-compare',
109+
'-Werror=misleading-indentation',
110+
'-Werror=int-in-bool-context',
111+
'-Werror=type-limits',
112+
'-Werror=deprecated-declarations',
113+
'-Werror=format-extra-args',
114+
'-Werror=format',
115+
])
116+
if cc.get_id() == 'gcc'
117+
common_cflags += cc.get_supported_arguments([
118+
'-Wextra',
119+
'-Weverything',
120+
])
121+
endif
122+
endif
7123

8-
test('basic', exe)
124+
subdir ('src')

meson_options.txt

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Copyright (C) 2022 Alexandros Theodotou <alex at zrythm dot org>
2+
#
3+
# This program is free software: you can redistribute it and/or modify
4+
# it under the terms of the GNU Affero General Public License as published by
5+
# the Free Software Foundation, either version 3 of the License, or
6+
# (at your option) any later version.
7+
#
8+
# This program is distributed in the hope that it will be useful,
9+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
10+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+
# GNU Affero General Public License for more details.
12+
#
13+
# You should have received a copy of the GNU Affero General Public License
14+
# along with this program. If not, see <https://www.gnu.org/licenses/>.
15+
#
16+
#
17+
option (
18+
'strict_flags', type: 'boolean', value: false,
19+
description: 'Enable strict compilation flags')
20+
21+
option (
22+
'lv2dir', type: 'string', value: 'lib/lv2',
23+
description: 'LV2 installation dir under the prefix')

src/meson.build

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Copyright (C) 2022 Alexandros Theodotou <alex at zrythm dot org>
2+
#
3+
# This program is free software: you can redistribute it and/or modify
4+
# it under the terms of the GNU Affero General Public License as published by
5+
# the Free Software Foundation, either version 3 of the License, or
6+
# (at your option) any later version.
7+
#
8+
# This program is distributed in the hope that it will be useful,
9+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
10+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+
# GNU Affero General Public License for more details.
12+
#
13+
# You should have received a copy of the GNU Affero General Public License
14+
# along with this program. If not, see <https://www.gnu.org/licenses/>.
15+
16+
exe = executable('passthrough_gtk4', 'passthrough_gtk4.c',
17+
install : true)
18+
19+
test('basic', exe)
File renamed without changes.

subprojects/gtk4.wrap

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[wrap-file]
2+
directory = gtk-4.6.0
3+
4+
source_url = https://gitlab.gnome.org/GNOME/gtk/-/archive/4.6.0/gtk-4.6.0.tar.gz
5+
source_filename = gtk-4.6.0.tar.gz
6+
source_hash = c507ffd8af8498a3f5b988d946a503907c3b86db03ce25670dcfbfac031470c4

0 commit comments

Comments
 (0)