aboutsummaryrefslogtreecommitdiffstats
path: root/host/cmake/Modules
diff options
context:
space:
mode:
Diffstat (limited to 'host/cmake/Modules')
-rw-r--r--host/cmake/Modules/FindDPDK.cmake32
1 files changed, 32 insertions, 0 deletions
diff --git a/host/cmake/Modules/FindDPDK.cmake b/host/cmake/Modules/FindDPDK.cmake
new file mode 100644
index 000000000..4382a8cce
--- /dev/null
+++ b/host/cmake/Modules/FindDPDK.cmake
@@ -0,0 +1,32 @@
+#
+# Copyright 2018 Ettus Research, a National Instruments Company
+#
+# SPDX-License-Identifier: GPL-3.0-or-later
+#
+# - Find DPDK
+# Find the DPDK includes and client library
+# This module defines
+# DPDK_INCLUDE_DIR, where to find rte_config.h
+# DPDK_LIBRARIES, the libraries needed by a DPDK user
+# DPDK_FOUND, If false, do not try to use DPDK.
+# also defined, but not for general use are
+# DPDK_LIBRARY, where to find the DPDK library.
+
+include(FindPackageHandleStandardArgs)
+
+find_path ( DPDK_INCLUDE_DIR rte_config.h
+ PATHS ENV RTE_INCLUDE
+ PATH_SUFFIXES dpdk
+)
+
+find_library(DPDK_LIBRARY
+ PATHS $ENV{RTE_SDK_DIR}/$ENV{RTE_TARGET}/lib
+)
+
+list(APPEND DPDK_LIBRARIES dpdk)
+
+find_package_handle_standard_args(dpdk
+ DEFAULT_MSG
+ DPDK_INCLUDE_DIR
+ DPDK_LIBRARIES
+)