updating dpdk cmake files
@@ -26,8 +26,10 @@ set(DPDK_LDFLAGS_FILE ${DPDK_SOURCE_DIR}/${DPDK_TARGET}/lib/ldflags.txt)
if(CMAKE_BUILD_TYPE MATCHES "Rel")
set(DPDK_EXTRA_CFLAGS "-fPIC -O3")
+ set(DPDK_CONFIG_FLAGS "-Dbuildtype=release")
else(CMAKE_BUILD_TYPE MATCHES "Rel")
set(DPDK_EXTRA_CFLAGS "-fPIC -O0 -g3 -mno-rdrnd -D_FORTIFY_SOURCE -fstack-protector-strong")
+ set(DPDK_CONFIG_FLAGS "-Dbuildtype=debug")
endif(CMAKE_BUILD_TYPE MATCHES "Rel")
if(CMAKE_VERBOSE_MAKEFILE)
@@ -40,9 +42,9 @@ endif(CMAKE_VERBOSE_MAKEFILE)
ExternalProject_Add(dpdk
PREFIX ${DPDK_BINARY_DIR}
SOURCE_DIR ${DPDK_SOURCE_DIR}
- CONFIGURE_COMMAND make -C ${DPDK_SOURCE_DIR} config T=${DPDK_TARGET}
- BUILD_COMMAND make -C ${DPDK_SOURCE_DIR} T=${DPDK_TARGET} DESTDIR=${DPDK_INSTALL_DIR} EXTRA_CFLAGS=${DPDK_EXTRA_CFLAGS} ${DPDK_VERBOSE_MAKEFILE}
- INSTALL_COMMAND make -C ${DPDK_SOURCE_DIR} install T=${DPDK_TARGET} DESTDIR=${DPDK_INSTALL_DIR} EXTRA_CFLAGS=${DPDK_EXTRA_CFLAGS} ${DPDK_VERBOSE_MAKEFILE}
+ CONFIGURE_COMMAND cd ${DPDK_SOURCE_DIR} && meson configure ${DPDK_CONFIG_FLAGS} ${DPDK_INSTALL_DIR}
+ BUILD_COMMAND ninja -C ${DPDK_SOURCE_DIR}
+ INSTALL_COMMAND
)
# configure DPDK options.
@@ -62,7 +64,8 @@ else(AZURE_SUPPORT)
set(DPDK_CONFIG_RTE_LIBRTE_VDEV_NETVSC_PMD n)
endif(AZURE_SUPPORT)
set(DPDK_CONFIG_COMMON_BASE ${DPDK_SOURCE_DIR}/config/common_base)
-configure_file(${DPDK_CONFIG_COMMON_BASE}.in ${DPDK_CONFIG_COMMON_BASE})
+set(DPDK_CONFIG_COMMON_BASE_IN ${DPDK_SOURCE_DIR}/config/common_linux)
+configure_file(${DPDK_CONFIG_COMMON_BASE_IN} ${DPDK_CONFIG_COMMON_BASE})
function(target_add_dpdk TARGET)
target_include_directories(${TARGET} PUBLIC ${DPDK_INCLUDE_DIR})
