diff --git a/buildlib/rdma_functions.cmake b/buildlib/rdma_functions.cmake index a32192e5c..f7c83d106 100644 --- a/buildlib/rdma_functions.cmake +++ b/buildlib/rdma_functions.cmake @@ -267,11 +267,10 @@ function(rdma_finalize_libs) endfunction() # Generate a pkg-config file -function(rdma_pkg_config PC_LIB_NAME PC_LIB_PRIVATE PC_INCLUDE_PRIVATE PC_REQUIRES) +function(rdma_pkg_config PC_LIB_NAME PC_REQUIRES_PRIVATE PC_LIB_PRIVATE) set(PC_LIB_NAME "${PC_LIB_NAME}") set(PC_LIB_PRIVATE "${PC_LIB_PRIVATE}") - set(PC_INCLUDE_PRIVATE "${PC_INCLUDE_PRIVATE}") - set(PC_REQUIRES "${PC_REQUIRES}") + set(PC_REQUIRES_PRIVATE "${PC_REQUIRES_PRIVATE}") get_target_property(PC_VERSION ${PC_LIB_NAME} VERSION) # With IN_PLACE=1 the install step is not ran, so generate the file in the build dir diff --git a/buildlib/template.pc.in b/buildlib/template.pc.in index 6722fa3b1..99a798464 100644 --- a/buildlib/template.pc.in +++ b/buildlib/template.pc.in @@ -7,7 +7,7 @@ Name: lib@PC_LIB_NAME@ Description: RDMA Core Userspace Library URL: https://github.com/linux-rdma/rdma-core Version: @PC_VERSION@ -Libs: -L${libdir} -l@PC_LIB_NAME@ @PC_RPATH@ Libs.private: @PC_LIB_PRIVATE@ -Cflags: -I${includedir} @PC_INCLUDE_PRIVATE@ -Requires: @PC_REQUIRES@ +Libs: -L${libdir} -l@PC_LIB_NAME@ @PC_RPATH@ +Requires.private: @PC_REQUIRES_PRIVATE@ +Cflags: -I${includedir} diff --git a/libibumad/CMakeLists.txt b/libibumad/CMakeLists.txt index 2ebc9b76c..1f600a022 100644 --- a/libibumad/CMakeLists.txt +++ b/libibumad/CMakeLists.txt @@ -16,4 +16,4 @@ rdma_library(ibumad libibumad.map umad_str.c ) -rdma_pkg_config("ibumad" "" "" "libibverbs") +rdma_pkg_config("ibumad" "" "") diff --git a/libibverbs/CMakeLists.txt b/libibverbs/CMakeLists.txt index 42ba13b2f..738e5e15a 100644 --- a/libibverbs/CMakeLists.txt +++ b/libibverbs/CMakeLists.txt @@ -53,4 +53,4 @@ target_link_libraries(ibverbs LINK_PRIVATE kern-abi ) -rdma_pkg_config("ibverbs" "${CMAKE_THREAD_LIBS_INIT}" "" "") +rdma_pkg_config("ibverbs" "" "${CMAKE_THREAD_LIBS_INIT}") diff --git a/librdmacm/CMakeLists.txt b/librdmacm/CMakeLists.txt index beb40be4c..f71e4076f 100644 --- a/librdmacm/CMakeLists.txt +++ b/librdmacm/CMakeLists.txt @@ -42,4 +42,4 @@ install(TARGETS rspreload DESTINATION "${CMAKE_INSTALL_LIBDIR}/rsocket/") rdma_install_symlink("librspreload.so" "${CMAKE_INSTALL_LIBDIR}/rsocket/librspreload.so.1") rdma_install_symlink("librspreload.so" "${CMAKE_INSTALL_LIBDIR}/rsocket/librspreload.so.1.0.0") -rdma_pkg_config("rdmacm" "" "" "libibverbs") +rdma_pkg_config("rdmacm" "libibverbs" "${CMAKE_THREAD_LIBS_INIT}") diff --git a/providers/mlx4/CMakeLists.txt b/providers/mlx4/CMakeLists.txt index a10fe0832..ad849f105 100644 --- a/providers/mlx4/CMakeLists.txt +++ b/providers/mlx4/CMakeLists.txt @@ -15,4 +15,4 @@ publish_headers(infiniband install(FILES "mlx4.conf" DESTINATION "${CMAKE_INSTALL_SYSCONFDIR}/modprobe.d/") -rdma_pkg_config("mlx4" "${CMAKE_THREAD_LIBS_INIT}" "" "") +rdma_pkg_config("mlx4" "libibverbs" "${CMAKE_THREAD_LIBS_INIT}") diff --git a/providers/mlx5/CMakeLists.txt b/providers/mlx5/CMakeLists.txt index d77c8f5e5..4a0f88bcd 100644 --- a/providers/mlx5/CMakeLists.txt +++ b/providers/mlx5/CMakeLists.txt @@ -27,4 +27,4 @@ publish_headers(infiniband mlx5dv.h ) -rdma_pkg_config("mlx5" "${CMAKE_THREAD_LIBS_INIT}" "" "") +rdma_pkg_config("mlx5" "libibverbs" "${CMAKE_THREAD_LIBS_INIT}")