build: add initial meson support
This commit is contained in:
parent
b32fd63c83
commit
b6dde3b2cf
63
meson.build
Normal file
63
meson.build
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
project(
|
||||||
|
'uvw',
|
||||||
|
['c', 'cpp'],
|
||||||
|
version: '3.3.0',
|
||||||
|
license: 'MIT',
|
||||||
|
default_options: ['cpp_std=c++17'],
|
||||||
|
)
|
||||||
|
|
||||||
|
libuv_dep = dependency('libuv', version: '1.46.0')
|
||||||
|
|
||||||
|
sources = [
|
||||||
|
'src/uvw/async.cpp',
|
||||||
|
'src/uvw/check.cpp',
|
||||||
|
'src/uvw/dns.cpp',
|
||||||
|
'src/uvw/emitter.cpp',
|
||||||
|
'src/uvw/fs.cpp',
|
||||||
|
'src/uvw/fs_event.cpp',
|
||||||
|
'src/uvw/fs_poll.cpp',
|
||||||
|
'src/uvw/idle.cpp',
|
||||||
|
'src/uvw/lib.cpp',
|
||||||
|
'src/uvw/loop.cpp',
|
||||||
|
'src/uvw/pipe.cpp',
|
||||||
|
'src/uvw/poll.cpp',
|
||||||
|
'src/uvw/prepare.cpp',
|
||||||
|
'src/uvw/process.cpp',
|
||||||
|
'src/uvw/signal.cpp',
|
||||||
|
'src/uvw/stream.cpp',
|
||||||
|
'src/uvw/tcp.cpp',
|
||||||
|
'src/uvw/thread.cpp',
|
||||||
|
'src/uvw/timer.cpp',
|
||||||
|
'src/uvw/tty.cpp',
|
||||||
|
'src/uvw/udp.cpp',
|
||||||
|
'src/uvw/util.cpp',
|
||||||
|
'src/uvw/work.cpp',
|
||||||
|
]
|
||||||
|
|
||||||
|
uvw_header_only_dep = declare_dependency(
|
||||||
|
include_directories: 'src',
|
||||||
|
)
|
||||||
|
|
||||||
|
uvw_lib = library(
|
||||||
|
'uvw', sources,
|
||||||
|
include_directories: 'src',
|
||||||
|
dependencies: [libuv_dep],
|
||||||
|
cpp_args: ['-DUVW_AS_LIB'],
|
||||||
|
install: true,
|
||||||
|
)
|
||||||
|
|
||||||
|
uvw_dep = declare_dependency(
|
||||||
|
include_directories: ['src'],
|
||||||
|
dependencies: [libuv_dep],
|
||||||
|
link_with: [uvw_lib],
|
||||||
|
)
|
||||||
|
|
||||||
|
if meson.version().version_compare('>=0.54.0')
|
||||||
|
meson.override_dependency('uvw', uvw_dep)
|
||||||
|
endif
|
||||||
|
|
||||||
|
pkg_mod = import('pkgconfig')
|
||||||
|
pkg_mod.generate(uvw_lib,
|
||||||
|
name: 'uvw',
|
||||||
|
filebase: 'uvw',
|
||||||
|
)
|
||||||
3
subprojects/.gitignore
vendored
Normal file
3
subprojects/.gitignore
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
*
|
||||||
|
!.gitignore
|
||||||
|
!*.wrap
|
||||||
13
subprojects/libuv.wrap
Normal file
13
subprojects/libuv.wrap
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
[wrap-file]
|
||||||
|
directory = libuv-v1.46.0
|
||||||
|
source_url = https://dist.libuv.org/dist/v1.46.0/libuv-v1.46.0.tar.gz
|
||||||
|
source_filename = libuv-v1.46.0.tar.gz
|
||||||
|
source_hash = 111f83958b9fdc65f1489195d25f342b9f7a3e683140c60e62c00fbaccddddce
|
||||||
|
patch_filename = libuv_1.46.0-1_patch.zip
|
||||||
|
patch_url = https://wrapdb.mesonbuild.com/v2/libuv_1.46.0-1/get_patch
|
||||||
|
patch_hash = 41b1834129f13efcb4a94a137335eb85fe0662509010c157617954d2feb20ac8
|
||||||
|
source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/libuv_1.46.0-1/libuv-v1.46.0.tar.gz
|
||||||
|
wrapdb_version = 1.46.0-1
|
||||||
|
|
||||||
|
[provide]
|
||||||
|
libuv = libuv_dep
|
||||||
Loading…
Reference in New Issue
Block a user