Skip to content

Commit 224c8ce

Browse files
committed
Use a single 'gio_platform' dependency object
1 parent 10170c6 commit 224c8ce

File tree

4 files changed

+15
-7
lines changed

4 files changed

+15
-7
lines changed

meson.build

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,14 @@ gio_windows = dependency('gio-windows-2.0', version: '>=2.40', required: false)
1717
gmodule = dependency('gmodule-2.0', version: '>=2.40')
1818
soup = dependency('libsoup-2.4', version: '>=2.44')
1919

20+
if gio_unix.found()
21+
gio_platform = gio_unix
22+
elif gio_windows.found()
23+
gio_platform = gio_windows
24+
else
25+
error('Either \'gio-unix-2.0\' or \'gio-windows-2.0\' must be available.')
26+
endif
27+
2028
# provide 'OutputStream.write_all_async' and 'SimpleIOStream'
2129
if gio.version().version_compare('>=2.44')
2230
add_project_arguments('--define=GIO_2_44', language: 'vala')

src/vsgi/meson.build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ vsgi_sources = files(
1919
'vsgi-socket-server.vala',
2020
'vsgi-tee-output-stream.vala')
2121
vsgi_lib = library('vsgi-' + api_version, vsgi_sources,
22-
dependencies: [glib, gobject, gio, gio_unix, gio_windows, gmodule, soup],
22+
dependencies: [glib, gobject, gio, gio_platform, gmodule, soup],
2323
vala_args: ['--pkg=posix'],
2424
vala_header: 'vsgi.h',
2525
install: true,

src/vsgi/servers/meson.build

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ shared_library('vsgi-http', ['vsgi-http.vala'],
44
install_dir: '@0@/vsgi-@1@/servers'.format(get_option('libdir'), api_version))
55

66
shared_library('vsgi-cgi', 'vsgi-cgi.vala',
7-
dependencies: [glib, gobject, gio, gio_unix, gio_windows, soup, vsgi],
7+
dependencies: [glib, gobject, gio, gio_platform, soup, vsgi],
88
install: true,
99
install_dir: '@0@/vsgi-@1@/servers'.format(get_option('libdir'), api_version))
1010

1111
fcgi = meson.get_compiler('c').find_library('fcgi', required: false)
1212
if fcgi.found()
1313
fcgi_vapi = meson.get_compiler('vala').find_library('fcgi', dirs: meson.current_source_dir())
1414
shared_library('vsgi-fastcgi', 'vsgi-fastcgi.vala',
15-
dependencies: [glib, gobject, gio, gio_unix, gio_windows, soup, vsgi, fcgi, fcgi_vapi],
15+
dependencies: [glib, gobject, gio, gio_platform, soup, vsgi, fcgi, fcgi_vapi],
1616
install: true,
1717
install_dir: '@0@/vsgi-@1@/servers'.format(get_option('libdir'), api_version))
1818
endif

tests/meson.build

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,16 @@ test('response', executable('response-test', 'response-test.vala',
2424
test('server', executable('server-test', 'server-test.vala',
2525
dependencies: [glib, gobject, gio, soup, vsgi]))
2626
test('http server', executable('http-server-test', 'http-server-test.vala',
27-
dependencies: [glib, gobject, gio, gio_unix, soup, vsgi]),
27+
dependencies: [glib, gobject, gio, gio_platform, soup, vsgi]),
2828
env: ['G_TEST_SRCDIR=' + meson.current_source_dir()])
2929
test('socket server', executable('socket-server-test', 'socket-server-test.vala',
30-
dependencies: [glib, gobject, gio, gio_unix, soup, vsgi]))
30+
dependencies: [glib, gobject, gio, gio_platform, soup, vsgi]))
3131
if fcgi.found()
3232
test('fastcgi server', executable('fastcgi-server-test', 'fastcgi-server-test.vala',
33-
dependencies: [glib, gobject, gio, gio_unix, soup, vsgi]))
33+
dependencies: [glib, gobject, gio, gio_platform, soup, vsgi]))
3434
endif
3535
loader_test_lib = shared_library('loader-test', 'loader-test.vala',
36-
dependencies: [glib, gobject, gio, gio_unix, soup, vsgi])
36+
dependencies: [glib, gobject, gio, gio_platform, soup, vsgi])
3737
test('loader', vsgi_loader,
3838
args: ['--directory', meson.current_build_dir(), '--server=cgi', 'loader-test'],
3939
env: ['VSGI_SERVER_PATH=src/vsgi/servers'])

0 commit comments

Comments
 (0)