summaryrefslogtreecommitdiffstats
path: root/src/ceph/cmake/modules/FindOpenLdap.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'src/ceph/cmake/modules/FindOpenLdap.cmake')
-rw-r--r--src/ceph/cmake/modules/FindOpenLdap.cmake22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/ceph/cmake/modules/FindOpenLdap.cmake b/src/ceph/cmake/modules/FindOpenLdap.cmake
new file mode 100644
index 0000000..35b711d
--- /dev/null
+++ b/src/ceph/cmake/modules/FindOpenLdap.cmake
@@ -0,0 +1,22 @@
+# - Find OpenLDAP C Libraries
+#
+# OPENLDAP_FOUND - True if found.
+# OPENLDAP_INCLUDE_DIR - Path to the openldap include directory
+# OPENLDAP_LIBRARIES - Paths to the ldap and lber libraries
+
+find_path(OPENLDAP_INCLUDE_DIR ldap.h PATHS
+ /usr/include
+ /opt/local/include
+ /usr/local/include)
+
+find_library(LDAP_LIBRARY ldap)
+find_library(LBER_LIBRARY lber)
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(OpenLdap DEFAULT_MSG
+ OPENLDAP_INCLUDE_DIR LDAP_LIBRARY LBER_LIBRARY)
+
+set(OPENLDAP_LIBRARIES ${LDAP_LIBRARY} ${LBER_LIBRARY})
+
+mark_as_advanced(
+ OPENLDAP_INCLUDE_DIR LDAP_LIBRARY LBER_LIBRARY)