From 136a04e3e7bf96a7b4574462790ed328bc6e8c4c Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Sun, 8 Jul 2018 18:21:37 +0800 Subject: [PATCH] cmake: do not depend on ${DPDK_LIBRARIES} if not using bundled dpdk ${DPDK_LIBRARIES} will be link flags instead of library targets if libdpdk is not built using the bundled source. Fixes: http://tracker.ceph.com/issues/24449 Signed-off-by: Kefu Chai (cherry picked from commit 1c41870184a3857d94ccf2c77958e2f0aad8dad8) --- src/CMakeLists.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 8fca928a5bd2e..1f6041c6bd76d 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -681,8 +681,9 @@ if(WITH_DPDK) add_library(common_async_dpdk STATIC ${common_async_dpdk_files}) # to ready the dpdk header files - add_dependencies(common_async_dpdk - ${DPDK_LIBRARIES}) + if(TARGET dpdk-ext) + add_dependencies(common_async_dpdk dpdk-ext) + endif() list(APPEND ceph_common_deps common_async_dpdk) target_link_libraries(common_async_dpdk ${DPDK_LIBRARIES}) -- 2.39.5