diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 18:24:20 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 18:24:20 +0000 |
commit | 483eb2f56657e8e7f419ab1a4fab8dce9ade8609 (patch) | |
tree | e5d88d25d870d5dedacb6bbdbe2a966086a0a5cf /src/civetweb/cmake/FindLibDl.cmake | |
parent | Initial commit. (diff) | |
download | ceph-483eb2f56657e8e7f419ab1a4fab8dce9ade8609.tar.xz ceph-483eb2f56657e8e7f419ab1a4fab8dce9ade8609.zip |
Adding upstream version 14.2.21.upstream/14.2.21upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/civetweb/cmake/FindLibDl.cmake')
-rw-r--r-- | src/civetweb/cmake/FindLibDl.cmake | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/src/civetweb/cmake/FindLibDl.cmake b/src/civetweb/cmake/FindLibDl.cmake new file mode 100644 index 00000000..c018d923 --- /dev/null +++ b/src/civetweb/cmake/FindLibDl.cmake @@ -0,0 +1,46 @@ +#.rst: +# FindLibDl +# -------- +# +# Find the native realtime includes and library. +# +# IMPORTED Targets +# ^^^^^^^^^^^^^^^^ +# +# This module defines :prop_tgt:`IMPORTED` target ``LIBDL::LIBDL``, if +# LIBDL has been found. +# +# Result Variables +# ^^^^^^^^^^^^^^^^ +# +# This module defines the following variables: +# +# :: +# +# LIBDL_INCLUDE_DIRS - where to find dlfcn.h, etc. +# LIBDL_LIBRARIES - List of libraries when using libdl. +# LIBDL_FOUND - True if dynamic linking library found. +# +# Hints +# ^^^^^ +# +# A user may set ``LIBDL_ROOT`` to a library installation root to tell this +# module where to look. + +find_path(LIBDL_INCLUDE_DIRS + NAMES dlfcn.h + PATHS ${LIBDL_ROOT}/include/ +) +find_library(LIBDL_LIBRARIES dl) +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(LibDl DEFAULT_MSG LIBDL_LIBRARIES LIBDL_INCLUDE_DIRS) +mark_as_advanced(LIBDL_INCLUDE_DIRS LIBDL_LIBRARIES) + +if(LIBDL_FOUND) + if(NOT TARGET LIBDL::LIBDL) + add_library(LIBDL::LIBDL UNKNOWN IMPORTED) + set_target_properties(LIBDL::LIBDL PROPERTIES + IMPORTED_LOCATION "${LIBDL_LIBRARIES}" + INTERFACE_INCLUDE_DIRECTORIES "${LIBDL_INCLUDE_DIRS}") + endif() +endif() |