summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorKefu Chai <kchai@redhat.com>2018-07-28 10:02:17 +0800
committerKefu Chai <kchai@redhat.com>2018-07-28 16:53:10 +0800
commita92fee76f12ab29a2bcbe9101bd5e86b867f52e5 (patch)
treee5566b5bd036fe1a394ba7c057c5de1707ed67dc /CMakeLists.txt
parent7dd82bbeb149c75e3f7b936f16144194405bfd7d (diff)
downloadceph-a92fee76f12ab29a2bcbe9101bd5e86b867f52e5.tar.gz
cmake: set HAVE_DPDK if it's available
Signed-off-by: Kefu Chai <kchai@redhat.com>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt11
1 files changed, 4 insertions, 7 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 74ed9a0ce95..f80020cd787 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)