]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
cmake: prefer static library when finding DPDK
authorKefu Chai <kchai@redhat.com>
Sat, 31 Jul 2021 08:08:44 +0000 (16:08 +0800)
committerKefu Chai <kchai@redhat.com>
Sat, 31 Jul 2021 08:29:28 +0000 (16:29 +0800)
Signed-off-by: Kefu Chai <kchai@redhat.com>
cmake/modules/Finddpdk.cmake

index 2cf2e6343b0eeaa5182bf7723b40223d074a73f3..fae4691a8865d02c56d1da881ce15e3f4357389a 100644 (file)
@@ -79,7 +79,11 @@ foreach(c ${components})
     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}