Merge pull request #42572 from tchaikov/wip-cmake-mgr-cleanup

cmake: initialize dpdk_LIBRARIES with empty list

Reviewed-by: Xiubo Li <xiubli@redhat.com>
This commit is contained in:
Kefu Chai 2021-08-02 11:09:47 +08:00 committed by GitHub
commit bc4aacbbbd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 5 deletions

View File

@ -72,15 +72,18 @@ set(components
# for collecting dpdk library targets, it will be used when defining dpdk::dpdk
set(_dpdk_libs)
# for list of dpdk library archive paths
set(dpdk_LIBRARIES)
set(dpdk_LIBRARIES "")
foreach(c ${components})
set(dpdk_lib dpdk::${c})
if(TARGET ${dpdk_lib})
get_target_property(DPDK_rte_${c}_LIBRARY
${dpdk_lib} IMPORTED_LOCATION)
else()
find_library(DPDK_rte_${c}_LIBRARY rte_${c}
find_library(DPDK_rte_${c}_LIBRARY
NAMES
# use static library
${CMAKE_STATIC_LIBRARY_PREFIX}rte_${c}${CMAKE_STATIC_LIBRARY_SUFFIX}
rte_${c}
HINTS
ENV DPDK_DIR
${dpdk_LIBRARY_DIRS}

View File

@ -3,9 +3,7 @@
#include "mgr/ServiceMap.h"
#include <experimental/iterator>
#include <fmt/format.h>
#include <regex>
#include "common/Formatter.h"