Skip to content

Fix dpdk support when using custom prefix #2542

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -875,9 +875,16 @@ else ()
endif ()

if (Seastar_DPDK)
# Although Seastar uses DPDK internally, DPDK symbols should not be exposed to
# Seastar users. However, DPDK's dependencies (like numa, pthread) must still
# be included in Seastar's INTERFACE_LINK_LIBRARIES to ensure proper linking
# of applications using Seastar.
target_link_libraries (seastar
PRIVATE
DPDK::dpdk)
"$<BUILD_INTERFACE:DPDK::dpdk>")
get_target_property(DPDK_INTERFACE_LINK_LIBRARIES DPDK::dpdk INTERFACE_LINK_LIBRARIES)
target_link_libraries (seastar
PRIVATE "${DPDK_INTERFACE_LINK_LIBRARIES}")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you use something like

seastar/CMakeLists.txt

Lines 867 to 875 in 665fed0

if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.26)
target_link_libraries (seastar
PRIVATE
"$<BUILD_LOCAL_INTERFACE:Valgrind::valgrind>")
else ()
target_link_libraries (seastar
PRIVATE
"$<BUILD_INTERFACE:Valgrind::valgrind>")
endif ()
?

so we don't forget dropping the workaround for older versions of CMake when we bump up the minimal required version of CMake ?

endif ()

include (TriStateOption)
Expand Down