$OpenBSD$ --- cmake/Findltdl.cmake.orig Thu Jun 26 13:16:36 2014 +++ cmake/Findltdl.cmake Thu Jun 26 13:16:36 2014 @@ -0,0 +1,27 @@ +# - Find ltdl +# Once done this will define +# LTDL_FOUND True if ltdl is found +# LTDL_INCLUDE_DIRS The ltdl header directories, containing ltdl.h +# LTDL_LIBRARIES The ltdl link libraries, needed to use ltdl + +#============================================================================= +# Copyright 2013 Yclept Nemo +# +# Distributed under the GNU Lesser General Public License v2.1 +# +# Based on the example provided at: +# http://www.cmake.org/Wiki/CMake:How_To_Find_Libraries#Writing_find_modules +#============================================================================= + +find_path(LTDL_INCLUDE_DIR ltdl.h) + +find_library(LTDL_LIBRARY ltdl) + +set(LTDL_INCLUDE_DIRS ${LTDL_INCLUDE_DIR}) +set(LTDL_LIBRARIES ${LTDL_LIBRARY}) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(LTDL DEFAULT_MESSAGE + LTDL_INCLUDE_DIR LTDL_LIBRARY) + +mark_as_advanced(LTDL_INCLUDE_DIR LTDL_LIBRARY)