2015-11-14 19:51:13 +00:00
|
|
|
# - Find OpenLDAP C Libraries
|
|
|
|
#
|
|
|
|
# OPENLDAP_FOUND - True if found.
|
2016-07-21 17:28:21 +00:00
|
|
|
# OPENLDAP_INCLUDE_DIR - Path to the openldap include directory
|
|
|
|
# OPENLDAP_LIBRARIES - Paths to the ldap and lber libraries
|
2015-11-14 19:51:13 +00:00
|
|
|
|
2016-07-21 17:28:21 +00:00
|
|
|
find_path(OPENLDAP_INCLUDE_DIR ldap.h PATHS
|
2015-11-14 19:51:13 +00:00
|
|
|
/usr/include
|
|
|
|
/opt/local/include
|
2016-07-21 17:28:21 +00:00
|
|
|
/usr/local/include)
|
2015-11-14 19:51:13 +00:00
|
|
|
|
2016-07-21 17:28:21 +00:00
|
|
|
find_library(LDAP_LIBRARY ldap)
|
|
|
|
find_library(LBER_LIBRARY lber)
|
2015-11-14 19:51:13 +00:00
|
|
|
|
2016-07-21 17:28:21 +00:00
|
|
|
include(FindPackageHandleStandardArgs)
|
|
|
|
find_package_handle_standard_args(OpenLdap DEFAULT_MSG
|
|
|
|
OPENLDAP_INCLUDE_DIR LDAP_LIBRARY LBER_LIBRARY)
|
2015-11-14 19:51:13 +00:00
|
|
|
|
2016-07-21 17:28:21 +00:00
|
|
|
set(OPENLDAP_LIBRARIES ${LDAP_LIBRARY} ${LBER_LIBRARY})
|
2015-11-14 19:51:13 +00:00
|
|
|
|
|
|
|
mark_as_advanced(
|
2016-07-21 17:28:21 +00:00
|
|
|
OPENLDAP_INCLUDE_DIR LDAP_LIBRARY LBER_LIBRARY)
|