summaryrefslogtreecommitdiffstats
path: root/cmake/modules/FindOpenLdap.cmake
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 18:45:59 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 18:45:59 +0000
commit19fcec84d8d7d21e796c7624e521b60d28ee21ed (patch)
tree42d26aa27d1e3f7c0b8bd3fd14e7d7082f5008dc /cmake/modules/FindOpenLdap.cmake
parentInitial commit. (diff)
downloadceph-upstream.tar.xz
ceph-upstream.zip
Adding upstream version 16.2.11+ds.upstream/16.2.11+dsupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'cmake/modules/FindOpenLdap.cmake')
-rw-r--r--cmake/modules/FindOpenLdap.cmake22
1 files changed, 22 insertions, 0 deletions
diff --git a/cmake/modules/FindOpenLdap.cmake b/cmake/modules/FindOpenLdap.cmake
new file mode 100644
index 000000000..35b711d6b
--- /dev/null
+++ b/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)