diff --git a/examples/l2fwd-keepalive/meson.build b/examples/l2fwd-keepalive/meson.build index 6f7b007e1e..aecc8d9fc9 100644 --- a/examples/l2fwd-keepalive/meson.build +++ b/examples/l2fwd-keepalive/meson.build @@ -6,7 +6,13 @@ # To build this example as a standalone application with an already-installed # DPDK instance, use 'make' -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' sources = files( 'main.c', 'shm.c'