2 # Find the native LIBDL includes and library
4 # LIBDL_INCLUDE_DIR - where to find dlfcn.h, etc.
5 # LIBDL_LIBRARIES - List of libraries when using libdl.
6 # LIBDL_FOUND - True if libdl found.
10 # Already in cache, be silent
11 SET(LIBDL_FIND_QUIETLY TRUE)
12 ENDIF (LIBDL_INCLUDE_DIR)
14 FIND_PATH(LIBDL_INCLUDE_DIR dlfcn.h)
16 SET(LIBDL_NAMES dl libdl ltdl libltdl)
17 FIND_LIBRARY(LIBDL_LIBRARY NAMES ${LIBDL_NAMES} )
19 # handle the QUIETLY and REQUIRED arguments and set LIBDL_FOUND to TRUE if
20 # all listed variables are TRUE
21 INCLUDE(FindPackageHandleStandardArgs)
22 FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibDL DEFAULT_MSG LIBDL_LIBRARY LIBDL_INCLUDE_DIR)
25 SET( LIBDL_LIBRARIES ${LIBDL_LIBRARY} )
27 SET( LIBDL_LIBRARIES )
30 MARK_AS_ADVANCED( LIBDL_LIBRARY LIBDL_INCLUDE_DIR )