diff options
Diffstat (limited to 'pki/cmake')
-rw-r--r-- | pki/cmake/Modules/FindMozLDAP.cmake | 19 | ||||
-rw-r--r-- | pki/cmake/Modules/FindSvrcore.cmake | 67 |
2 files changed, 86 insertions, 0 deletions
diff --git a/pki/cmake/Modules/FindMozLDAP.cmake b/pki/cmake/Modules/FindMozLDAP.cmake index 4f728c36b..634241ce1 100644 --- a/pki/cmake/Modules/FindMozLDAP.cmake +++ b/pki/cmake/Modules/FindMozLDAP.cmake @@ -26,6 +26,7 @@ else (MOZLDAP_LIBRARIES AND MOZLDAP_INCLUDE_DIRS) find_path(MOZLDAP_INCLUDE_DIR NAMES ldap.h + ldif.h PATHS ${_MOZLDAP_INCLUDEDIR} /usr/include @@ -69,6 +70,17 @@ else (MOZLDAP_LIBRARIES AND MOZLDAP_INCLUDE_DIRS) /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} ) @@ -94,6 +106,13 @@ else (MOZLDAP_LIBRARIES AND MOZLDAP_INCLUDE_DIRS) ) 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) diff --git a/pki/cmake/Modules/FindSvrcore.cmake b/pki/cmake/Modules/FindSvrcore.cmake new file mode 100644 index 000000000..cfb073301 --- /dev/null +++ b/pki/cmake/Modules/FindSvrcore.cmake @@ -0,0 +1,67 @@ +# - Try to find Svrcore +# Once done this will define +# +# SVRCORE_FOUND - system has Svrcore +# SVRCORE_INCLUDE_DIRS - the Svrcore include directory +# SVRCORE_LIBRARIES - Link these to use Svrcore +# SVRCORE_DEFINITIONS - Compiler switches required for using Svrcore +# +# Copyright (c) 2010 Matthew Harmsen <mharmsen@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 (SVRCORE_LIBRARIES AND SVRCORE_INCLUDE_DIRS) + # in cache already + set(SVRCORE_FOUND TRUE) +else (SVRCORE_LIBRARIES AND SVRCORE_INCLUDE_DIRS) + find_package(PkgConfig) + if (PKG_CONFIG_FOUND) + pkg_check_modules(_SVRCORE svrcore) + endif (PKG_CONFIG_FOUND) + + find_path(SVRCORE_INCLUDE_DIR + NAMES + svrcore.h + PATHS + ${_SVRCORE_INCLUDEDIR} + /usr/include + /usr/local/include + /opt/local/include + /sw/include + PATH_SUFFIXES + svrcore + ) + + find_library(SVRCORE_LIBRARY + NAMES + svrcore + PATHS + ${_SVRCORE_LIBDIR} + /usr/lib + /usr/local/lib + /opt/local/lib + /sw/lib + ) + + set(SVRCORE_INCLUDE_DIRS + ${SVRCORE_INCLUDE_DIR} + ) + + if (SVRCORE_LIBRARY) + set(SVRCORE_LIBRARIES + ${SVRCORE_LIBRARIES} + ${SVRCORE_LIBRARY} + ) + endif (SVRCORE_LIBRARY) + + include(FindPackageHandleStandardArgs) + find_package_handle_standard_args(Svrcore DEFAULT_MSG SVRCORE_LIBRARIES SVRCORE_INCLUDE_DIRS) + + # show the SVRCORE_INCLUDE_DIRS and SVRCORE_LIBRARIES variables only in the advanced view + mark_as_advanced(SVRCORE_INCLUDE_DIRS SVRCORE_LIBRARIES) + +endif (SVRCORE_LIBRARIES AND SVRCORE_INCLUDE_DIRS) |