| 1 |
# - Try to find the LDAP client libraries |
| 2 |
# Once done this will define |
| 3 |
# |
| 4 |
# LDAP_FOUND - system has libldap |
| 5 |
# LDAP_INCLUDE_DIRS - the ldap include directory |
| 6 |
# LDAP_LIBRARIES - libldap + liblber (if found) library |
| 7 |
# LBER_LIBRARIES - liblber library |
| 8 |
|
| 9 |
if(LDAP_INCLUDE_DIRS AND LDAP_LIBRARIES) |
| 10 |
# Already in cache, be silent |
| 11 |
set(Ldap_FIND_QUIETLY TRUE) |
| 12 |
endif() |
| 13 |
|
| 14 |
FIND_PATH(LDAP_INCLUDE_DIRS ldap.h) |
| 15 |
FIND_LIBRARY(LDAP_LIBRARIES NAMES ldap) |
| 16 |
FIND_LIBRARY(LBER_LIBRARIES NAMES lber) |
| 17 |
|
| 18 |
if(LDAP_INCLUDE_DIRS AND LDAP_LIBRARIES) |
| 19 |
set(LDAP_FOUND TRUE) |
| 20 |
if(LBER_LIBRARIES) |
| 21 |
set(LDAP_LIBRARIES ${LDAP_LIBRARIES} ${LBER_LIBRARIES}) |
| 22 |
endif() |
| 23 |
endif() |
| 24 |
|
| 25 |
if(LDAP_FOUND) |
| 26 |
if(NOT Ldap_FIND_QUIETLY) |
| 27 |
message(STATUS "Found ldap: ${LDAP_LIBRARIES}") |
| 28 |
endif() |
| 29 |
else() |
| 30 |
if(Ldap_FIND_REQUIRED) |
| 31 |
message(FATAL_ERROR "Could NOT find ldap") |
| 32 |
endif() |
| 33 |
endif() |
| 34 |
|
| 35 |
MARK_AS_ADVANCED(LDAP_INCLUDE_DIRS LDAP_LIBRARIES LBER_LIBRARIES) |