diff options
author | Guillaume Solignac <gsoligna@cisco.com> | 2024-06-19 13:32:47 +0200 |
---|---|---|
committer | Damjan Marion <dmarion@0xa5.net> | 2024-08-21 12:05:27 +0000 |
commit | fb9dd888096f86192e5c20b6246893b4bc3dd3d3 (patch) | |
tree | e53292ceb73f139944a859f904223d7352bbd8fe /src | |
parent | df87789a2a0523b9ab9e52e30b89d16f887524e7 (diff) |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/vppinfra/CMakeLists.txt | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/src/vppinfra/CMakeLists.txt b/src/vppinfra/CMakeLists.txt index 233e75d6e2a..0b8b6ae1226 100644 --- a/src/vppinfra/CMakeLists.txt +++ b/src/vppinfra/CMakeLists.txt @@ -16,15 +16,7 @@ enable_language(ASM) ############################################################################## # find libdl ############################################################################## -vpp_find_path(LIBDL_INCLUDE_DIR dlfcn.h) -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() +list(APPEND VPPINFRA_LIBS ${CMAKE_DL_LIBS}) ############################################################################## # find libunwind |