vppinfra: cleaner way of getting libdl in CMake
Cmake has a dedicated CMAKE_DL_LIBS variable to get libdl; use it instead of trying to find it manually. Type: improvement Signed-off-by: Guillaume Solignac <gsoligna@cisco.com> Change-Id: I9969c6be029f6a6e09cccaecd50e9eaf7d785b34
This commit is contained in:

committed by
Damjan Marion

parent
df87789a2a
commit
fb9dd88809
@ -16,15 +16,7 @@ enable_language(ASM)
|
|||||||
##############################################################################
|
##############################################################################
|
||||||
# find libdl
|
# find libdl
|
||||||
##############################################################################
|
##############################################################################
|
||||||
vpp_find_path(LIBDL_INCLUDE_DIR dlfcn.h)
|
list(APPEND VPPINFRA_LIBS ${CMAKE_DL_LIBS})
|
||||||
vpp_find_library(LIBDL_LIB NAMES dl)
|
|
||||||
|
|
||||||
if (LIBDL_INCLUDE_DIR AND LIBDL_LIB)
|
|
||||||
message(STATUS "libdl found at ${LIBDL_LIB}")
|
|
||||||
list(APPEND VPPINFRA_LIBS ${LIBDL_LIB})
|
|
||||||
else()
|
|
||||||
message(FATAL_ERROR "libdl not found")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
# find libunwind
|
# find libunwind
|
||||||
|
Reference in New Issue
Block a user