rizin/subprojects/rzwinkd/meson.build
Riccardo Schirone fdd7c6200c
Fix compilation on Termux and Haiku (#2671)
* build: fix compilation on Termux by using meson checks
* build: fix compilation on termux, which is recognized as linux

meson identifies termux as "linux" system, however pthread_sigmask is
not available there. Since pthread-fixes.c just defines
uv__pthread_sigmask we include it also in regular linux builds, because
the function is then used automatically instead of pthread_sigmask only
when __ANDROID__ is defined.

* subprojects/rzwinkd: define cc in meson.build before use
2022-06-07 23:44:41 +02:00

39 lines
838 B
Meson

project('rzwinkd', 'c',
license : [ 'LGPL']
)
cc = meson.get_compiler('c')
winkd_files = [
'iob_pipe.c',
'iob_net.c',
'kd.c',
'transport.c',
'winkd.c',
]
winkd_inc = [include_directories('.')]
rz_util_dep = dependency('rz_util')
rz_socket_dep = dependency('rz_socket')
rz_hash_dep = dependency('rz_hash')
rz_crypto_dep = dependency('rz_crypto')
librzwinkd_deps = [rz_util_dep, rz_socket_dep, rz_hash_dep, rz_crypto_dep]
if host_machine.system() == 'haiku'
librzwinkd_deps += [
cc.find_library('network')
]
endif
librzwinkd = static_library('rzwinkd', winkd_files,
dependencies: librzwinkd_deps,
include_directories: winkd_inc,
implicit_include_directories: false
)
winkd_dep = declare_dependency(
link_with: librzwinkd,
include_directories: winkd_inc
)
meson.override_dependency('rzwinkd', winkd_dep)