diff options
author | Guy Harris <gharris@sonic.net> | 2022-09-27 21:17:12 -0700 |
---|---|---|
committer | Guy Harris <gharris@sonic.net> | 2022-09-27 21:17:27 -0700 |
commit | 6493919a4c7cf15d3d4f9878b2f290dd36efafc0 (patch) | |
tree | c797eba2390098aee1f7209a3f9687666998cc7e /cmake/Modules/Finddpdk.cmake | |
parent | 7375f7ca574ff862f4886bcbf093ada57c485db9 (diff) |
autoconf, cmake: fix generated pcap-config and libpcap.pc.
In libpcap.pc, don't put libraries into Libs.private if we can just put
the package to which the libraries belong in Requires.private and let
pkg-config do the work.
When configuring with CMake, make sure that we do *NOT* put library full
paths into the lists of libraries required when linking statically
against libpcap.
In the configure script, do a push settings/pop settings
operation before checking various libraries similar to what's done in
CMake files, to make sure that the results of the tests aren't affected
by tests done previously.
Have the macros for autoconf that run pcap-config take arbitrary
arguments rather than a single flag value, to allow testing with --libs
and --static.
This should fix issue #1062.
Diffstat (limited to 'cmake/Modules/Finddpdk.cmake')
-rw-r--r-- | cmake/Modules/Finddpdk.cmake | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/cmake/Modules/Finddpdk.cmake b/cmake/Modules/Finddpdk.cmake index a328482f..793f4876 100644 --- a/cmake/Modules/Finddpdk.cmake +++ b/cmake/Modules/Finddpdk.cmake @@ -5,6 +5,10 @@ # dpdk_FOUND # dpdk_INCLUDE_DIRS # dpdk_LIBRARIES +# dpdk_STATIC_LIBRARIES +# dpdk_LIBS_STATIC +# dpdk_REQUIRES_PRIVATE +# dpdk_PACKAGE_NAME # # We only try to find DPDK using pkg-config; DPDK is *SO* @@ -34,10 +38,16 @@ if(PKG_CONFIG_FOUND) set(ENV{PKG_CONFIG_PATH} "${dpdk_ROOT}/pkgconfig:$ENV{PKG_CONFIG_PATH}") endif() pkg_check_modules(dpdk QUIET libdpdk) + if(dpdk_FOUND) + # + # Get static library information for DPDK. + # + pkg_get_static_link_info(dpdk libdpdk) + endif() set(ENV{PKG_CONFIG_PATH} "${save_PKG_CONFIG_PATH}") endif() -mark_as_advanced(dpdk_INCLUDE_DIRS ${dpdk_LIBRARIES}) +mark_as_advanced(dpdk_INCLUDE_DIRS dpdk_LIBRARIES dpdk_STATIC_LIBRARIES dpdk_REQUIRES_PRIVATE) include(FindPackageHandleStandardArgs) find_package_handle_standard_args(dpdk DEFAULT_MSG |