summaryrefslogtreecommitdiffstats
path: root/cmake/Modules/FindMozLDAP.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/FindMozLDAP.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/FindMozLDAP.cmake')
-rw-r--r--cmake/Modules/FindMozLDAP.cmake122
1 files changed, 122 insertions, 0 deletions
diff --git a/cmake/Modules/FindMozLDAP.cmake b/cmake/Modules/FindMozLDAP.cmake
new file mode 100644
index 000000000..634241ce1
--- /dev/null
+++ b/cmake/Modules/FindMozLDAP.cmake
@@ -0,0 +1,122 @@
+# - Try to find MozLDAP
+# Once done this will define
+#
+# MOZLDAP_FOUND - system has MozLDAP
+# MOZLDAP_INCLUDE_DIRS - the MozLDAP include directory
+# MOZLDAP_LIBRARIES - Link these to use MozLDAP
+# MOZLDAP_DEFINITIONS - Compiler switches required for using MozLDAP
+#
+# Copyright (c) 2010 Andreas Schneider <asn@redhat.com>
+#
+# Redistribution and use is allowed according to the terms of the New
+# BSD license.
+# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
+#
+
+
+if (MOZLDAP_LIBRARIES AND MOZLDAP_INCLUDE_DIRS)
+ # in cache already
+ set(MOZLDAP_FOUND TRUE)
+else (MOZLDAP_LIBRARIES AND MOZLDAP_INCLUDE_DIRS)
+ find_package(PkgConfig)
+ if (PKG_CONFIG_FOUND)
+ pkg_check_modules(_MOZLDAP mozldap)
+ endif (PKG_CONFIG_FOUND)
+
+ find_path(MOZLDAP_INCLUDE_DIR
+ NAMES
+ ldap.h
+ ldif.h
+ PATHS
+ ${_MOZLDAP_INCLUDEDIR}
+ /usr/include
+ /usr/local/include
+ /opt/local/include
+ /sw/include
+ PATH_SUFFIXES
+ mozldap
+ )
+
+ find_library(SSLDAP60_LIBRARY
+ NAMES
+ ssldap60
+ PATHS
+ ${_MOZLDAP_LIBDIR}
+ /usr/lib
+ /usr/local/lib
+ /opt/local/lib
+ /sw/lib
+ )
+
+ find_library(PRLDAP60_LIBRARY
+ NAMES
+ prldap60
+ PATHS
+ ${_MOZLDAP_LIBDIR}
+ /usr/lib
+ /usr/local/lib
+ /opt/local/lib
+ /sw/lib
+ )
+
+ find_library(LDAP60_LIBRARY
+ NAMES
+ ldap60
+ PATHS
+ ${_MOZLDAP_LIBDIR}
+ /usr/lib
+ /usr/local/lib
+ /opt/local/lib
+ /sw/lib
+ )
+
+ find_library(LDIF60_LIBRARY
+ NAMES
+ ldif60
+ PATHS
+ ${_MOZLDAP_LIBDIR}
+ /usr/lib
+ /usr/local/lib
+ /opt/local/lib
+ /sw/lib
+ )
+
+ set(MOZLDAP_INCLUDE_DIRS
+ ${MOZLDAP_INCLUDE_DIR}
+ )
+
+ if (SSLDAP60_LIBRARY)
+ set(MOZLDAP_LIBRARIES
+ ${MOZLDAP_LIBRARIES}
+ ${SSLDAP60_LIBRARY}
+ )
+ endif (SSLDAP60_LIBRARY)
+
+ if (PRLDAP60_LIBRARY)
+ set(MOZLDAP_LIBRARIES
+ ${MOZLDAP_LIBRARIES}
+ ${PRLDAP60_LIBRARY}
+ )
+ endif (PRLDAP60_LIBRARY)
+
+ if (LDAP60_LIBRARY)
+ set(MOZLDAP_LIBRARIES
+ ${MOZLDAP_LIBRARIES}
+ ${LDAP60_LIBRARY}
+ )
+ endif (LDAP60_LIBRARY)
+
+ if (LDIF60_LIBRARY)
+ set(MOZLDAP_LIBRARIES
+ ${MOZLDAP_LIBRARIES}
+ ${LDIF60_LIBRARY}
+ )
+ endif (LDIF60_LIBRARY)
+
+ include(FindPackageHandleStandardArgs)
+ find_package_handle_standard_args(MozLDAP DEFAULT_MSG MOZLDAP_LIBRARIES MOZLDAP_INCLUDE_DIRS)
+
+ # show the MOZLDAP_INCLUDE_DIRS and MOZLDAP_LIBRARIES variables only in the advanced view
+ mark_as_advanced(MOZLDAP_INCLUDE_DIRS MOZLDAP_LIBRARIES)
+
+endif (MOZLDAP_LIBRARIES AND MOZLDAP_INCLUDE_DIRS)