Skip to content

Commit

Permalink
build: Do not require find_package(dpkd) when using seastar
Browse files Browse the repository at this point in the history
dpdk is included to within seastar, accordingly it should not be
required to have dpdk package available when using seastar as
dependency.

This fixes build failures when attempting to use seastar from a custom
install prefix.
  • Loading branch information
p12tic committed Nov 25, 2024
1 parent 289f7f8 commit 252f857
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ set (Seastar_GEN_BINARY_DIR ${Seastar_BINARY_DIR}/gen)
#

include (SeastarDependencies)
seastar_find_dependencies ()
seastar_find_dependencies (BUILD)

# Private build dependencies not visible to consumers
find_package (ragel 6.10 REQUIRED)
Expand Down
9 changes: 8 additions & 1 deletion cmake/SeastarDependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ endmacro ()
# with the corresponding configuration for each 3rd-party dependency.
#
macro (seastar_find_dependencies)
cmake_parse_arguments (args "BUILD" "" "" ${ARGN})

#
# List of Seastar dependencies that is meant to be used
# both in Seastar configuration and by clients which
Expand All @@ -84,7 +86,6 @@ macro (seastar_find_dependencies)
# Public dependencies.
Boost
c-ares
dpdk # No version information published.
fmt
lz4
# Private and private/public dependencies.
Expand All @@ -103,6 +104,12 @@ macro (seastar_find_dependencies)
ucontext
yaml-cpp)

# Only expose dpdk dependency during build. Since dpdk is included to within seastar library,
# there is no need to force it to be discoverable via find_package().
if (args_BUILD)
list (APPEND _seastar_all_dependencies dpdk)
endif()

# Arguments to `find_package` for each 3rd-party dependency.
# Note that the version specification is a "minimal" version requirement.

Expand Down

0 comments on commit 252f857

Please sign in to comment.