Merge pull request #140 from Cogitri/meson
Add support for building with meson
This commit is contained in:
commit
8c2790c66e
15
meson.build
Normal file
15
meson.build
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
project('eventcore', 'd',
|
||||||
|
meson_version: '>=0.50',
|
||||||
|
version: '0.8.50'
|
||||||
|
)
|
||||||
|
|
||||||
|
project_soversion = '0'
|
||||||
|
project_version_suffix = ''
|
||||||
|
project_version = meson.project_version()
|
||||||
|
project_version_full = project_version + project_version_suffix
|
||||||
|
|
||||||
|
taggedalgebraic_dep = dependency('taggedalgebraic', version: ['>=0.10.12', '<0.12'])
|
||||||
|
|
||||||
|
source_root = meson.source_root()
|
||||||
|
build_root = meson.build_root()
|
||||||
|
subdir('source/eventcore')
|
66
source/eventcore/meson.build
Normal file
66
source/eventcore/meson.build
Normal file
|
@ -0,0 +1,66 @@
|
||||||
|
eventcore_src = [
|
||||||
|
'core.d',
|
||||||
|
'driver.d',
|
||||||
|
'drivers/libasync.d',
|
||||||
|
'drivers/posix/dns.d',
|
||||||
|
'drivers/posix/driver.d',
|
||||||
|
'drivers/posix/epoll.d',
|
||||||
|
'drivers/posix/events.d',
|
||||||
|
'drivers/posix/kqueue.d',
|
||||||
|
'drivers/posix/pipes.d',
|
||||||
|
'drivers/posix/processes.d',
|
||||||
|
'drivers/posix/select.d',
|
||||||
|
'drivers/posix/signals.d',
|
||||||
|
'drivers/posix/sockets.d',
|
||||||
|
'drivers/posix/watchers.d',
|
||||||
|
'drivers/threadedfile.d',
|
||||||
|
'drivers/timer.d',
|
||||||
|
'drivers/winapi/core.d',
|
||||||
|
'drivers/winapi/dns.d',
|
||||||
|
'drivers/winapi/driver.d',
|
||||||
|
'drivers/winapi/events.d',
|
||||||
|
'drivers/winapi/files.d',
|
||||||
|
'drivers/winapi/pipes.d',
|
||||||
|
'drivers/winapi/processes.d',
|
||||||
|
'drivers/winapi/signals.d',
|
||||||
|
'drivers/winapi/sockets.d',
|
||||||
|
'drivers/winapi/watchers.d',
|
||||||
|
'internal/consumablequeue.d',
|
||||||
|
'internal/dlist.d',
|
||||||
|
'internal/utils.d',
|
||||||
|
'internal/win32.d',
|
||||||
|
'socket.d',
|
||||||
|
|
||||||
|
]
|
||||||
|
|
||||||
|
eventcore_lib = library(
|
||||||
|
'eventcore',
|
||||||
|
eventcore_src,
|
||||||
|
version: project_version,
|
||||||
|
install: true,
|
||||||
|
include_directories: include_directories('../'),
|
||||||
|
dependencies: taggedalgebraic_dep,
|
||||||
|
)
|
||||||
|
|
||||||
|
pkgc = import('pkgconfig')
|
||||||
|
|
||||||
|
pkgc.generate(
|
||||||
|
eventcore_lib,
|
||||||
|
subdirs: 'd/eventcore',
|
||||||
|
)
|
||||||
|
|
||||||
|
install_headers(
|
||||||
|
eventcore_src,
|
||||||
|
subdir: 'd/eventcore/eventcore',
|
||||||
|
)
|
||||||
|
|
||||||
|
test_exe = executable(
|
||||||
|
'eventcore_test',
|
||||||
|
eventcore_src,
|
||||||
|
include_directories: include_directories('../'),
|
||||||
|
d_unittest: true,
|
||||||
|
d_args: '-main',
|
||||||
|
dependencies: taggedalgebraic_dep,
|
||||||
|
)
|
||||||
|
|
||||||
|
test('test_eventcore', test_exe)
|
Loading…
Reference in a new issue