summaryrefslogtreecommitdiffstats
path: root/cmake/Modules/FindLdap.cmake
diff options
context:
space:
mode:
authorEndi Sukma Dewata <edewata@redhat.com>2012-03-24 02:27:47 -0500
committerEndi Sukma Dewata <edewata@redhat.com>2012-03-26 11:43:54 -0500
commit621d9e5c413e561293d7484b93882d985b3fe15f (patch)
tree638f3d75761c121d9a8fb50b52a12a6686c5ac5c /cmake/Modules/FindLdap.cmake
parent40d3643b8d91886bf210aa27f711731c81a11e49 (diff)
downloadpki-621d9e5c413e561293d7484b93882d985b3fe15f.tar.gz
pki-621d9e5c413e561293d7484b93882d985b3fe15f.tar.xz
pki-621d9e5c413e561293d7484b93882d985b3fe15f.zip
Removed unnecessary pki folder.
Previously the source code was located inside a pki folder. This folder was created during svn migration and is no longer needed. This folder has now been removed and the contents have been moved up one level. Ticket #131
Diffstat (limited to 'cmake/Modules/FindLdap.cmake')
-rw-r--r--cmake/Modules/FindLdap.cmake82
1 files changed, 82 insertions, 0 deletions
diff --git a/cmake/Modules/FindLdap.cmake b/cmake/Modules/FindLdap.cmake
new file mode 100644
index 000000000..be4693bd7
--- /dev/null
+++ b/cmake/Modules/FindLdap.cmake
@@ -0,0 +1,82 @@
+# - Try to find Ldap
+# Once done this will define
+#
+# LDAP_FOUND - system has Ldap
+# LDAP_INCLUDE_DIRS - the Ldap include directory
+# LDAP_LIBRARIES - Link these to use Ldap
+# LDAP_DEFINITIONS - Compiler switches required for using Ldap
+#
+# Copyright (c) 2010 Matthew Harmsen <mharmsen@redhat.com>
+#
+# NOTE: This file was generated via 'generate_findpackage_file'
+#
+# Copyright (c) 2006 Alexander Neundorf <neundorf@kde.org>
+# Copyright (c) 2006 Andreas Schneider <mail@cynapses.org>
+#
+# Redistribution and use is allowed according to the terms of the New
+# BSD license.
+# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
+#
+
+
+if (LDAP_LIBRARIES AND LDAP_INCLUDE_DIRS)
+ # in cache already
+ set(LDAP_FOUND TRUE)
+else (LDAP_LIBRARIES AND LDAP_INCLUDE_DIRS)
+
+ find_path(LDAP_INCLUDE_DIR
+ NAMES
+ ldap.h lber.h
+ PATHS
+ /usr/include
+ /usr/local/include
+ /opt/local/include
+ /sw/include
+ )
+
+ find_library(LDAP_LIBRARY
+ NAMES
+ ldap
+ PATHS
+ /usr/lib
+ /usr/local/lib
+ /opt/local/lib
+ /sw/lib
+ )
+
+ find_library(LBER_LIBRARY
+ NAMES
+ lber
+ PATHS
+ /usr/lib
+ /usr/local/lib
+ /opt/local/lib
+ /sw/lib
+ )
+
+ set(LDAP_INCLUDE_DIRS
+ ${LDAP_INCLUDE_DIR}
+ )
+
+ if (LDAP_LIBRARY)
+ set(LDAP_LIBRARIES
+ ${LDAP_LIBRARIES}
+ ${LDAP_LIBRARY}
+ )
+ endif (LDAP_LIBRARY)
+
+ if (LBER_LIBRARY)
+ set(LDAP_LIBRARIES
+ ${LDAP_LIBRARIES}
+ ${LBER_LIBRARY}
+ )
+ endif (LBER_LIBRARY)
+
+ include(FindPackageHandleStandardArgs)
+ find_package_handle_standard_args(Ldap DEFAULT_MSG LDAP_LIBRARIES LDAP_INCLUDE_DIRS)
+
+ # show the LDAP_INCLUDE_DIRS and LDAP_LIBRARIES variables only in the advanced view
+ mark_as_advanced(LDAP_INCLUDE_DIRS LDAP_LIBRARIES)
+
+endif (LDAP_LIBRARIES AND LDAP_INCLUDE_DIRS)
+