examples/l2fwd-keepalive: skip meson build if no librt
When librt is not present on a system, processing the meson.build file for this example application causes an error. Make the library non-mandatory and just mark the example as unbuildable if it is not present. Fixes: 89f0711f9ddf ("examples: build some samples with meson") Cc: stable@dpdk.org Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
This commit is contained in:
parent
e5b95003f1
commit
b334236abd
@ -7,7 +7,13 @@
|
|||||||
# DPDK instance, use 'make'
|
# DPDK instance, use 'make'
|
||||||
|
|
||||||
allow_experimental_apis = true
|
allow_experimental_apis = true
|
||||||
ext_deps += cc.find_library('rt')
|
librt = cc.find_library('rt', required: false)
|
||||||
|
if not librt.found()
|
||||||
|
build = false
|
||||||
|
subdir_done()
|
||||||
|
endif
|
||||||
|
|
||||||
|
ext_deps += librt
|
||||||
deps += 'timer'
|
deps += 'timer'
|
||||||
sources = files(
|
sources = files(
|
||||||
'main.c', 'shm.c'
|
'main.c', 'shm.c'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user