From a92fee76f12ab29a2bcbe9101bd5e86b867f52e5 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Sat, 28 Jul 2018 10:02:17 +0800 Subject: [PATCH] cmake: set HAVE_DPDK if it's available Signed-off-by: Kefu Chai --- CMakeLists.txt | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 74ed9a0ce952e..f80020cd78751 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -365,14 +365,11 @@ endif() option(WITH_DPDK "Enable DPDK messaging" OFF) if(WITH_DPDK) find_package(dpdk) - set(HAVE_DPDK ${DPDK_FOUND}) - if(NOT TARGET dpdk-ext) - find_package(dpdk) - if(NOT DPDK_FOUND) - include(BuildDPDK) - build_dpdk() - endif() + if(NOT DPDK_FOUND AND NOT TARGET dpdk-ext) + include(BuildDPDK) + build_dpdk() endif() + set(HAVE_DPDK TRUE) endif() option(WITH_BLKIN "Use blkin to emit LTTng tracepoints for Zipkin" OFF) -- 2.39.5