2006-10-02 15:18:50 +00:00
|
|
|
# - Try to find the sasl2 directory library
|
|
|
|
# Once done this will define
|
|
|
|
#
|
|
|
|
# SASL2_FOUND - system has SASL2
|
|
|
|
# SASL2_INCLUDE_DIR - the SASL2 include directory
|
|
|
|
# SASL2_LIBRARIES - The libraries needed to use SASL2
|
|
|
|
#
|
|
|
|
# Copyright (c) 2006, Laurent Montel, <montel@kde.org>
|
|
|
|
#
|
|
|
|
# Redistribution and use is allowed according to the terms of the BSD license.
|
|
|
|
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
|
|
|
|
|
|
|
|
|
|
|
|
if (SASL2_INCLUDE_DIR)
|
|
|
|
# Already in cache, be silent
|
|
|
|
set(SASL2_FIND_QUIETLY TRUE)
|
2020-02-15 11:00:57 +01:00
|
|
|
endif()
|
2006-10-02 15:18:50 +00:00
|
|
|
|
2007-08-06 19:25:31 +00:00
|
|
|
FIND_PATH(SASL2_INCLUDE_DIR sasl/sasl.h)
|
|
|
|
|
|
|
|
FIND_LIBRARY(SASL2_LIBRARIES NAMES sasl2)
|
2006-10-02 15:18:50 +00:00
|
|
|
|
|
|
|
|
|
|
|
if (SASL2_INCLUDE_DIR AND SASL2_LIBRARIES)
|
|
|
|
set(SASL2_FOUND TRUE)
|
2020-02-15 11:00:57 +01:00
|
|
|
endif()
|
2006-10-02 15:18:50 +00:00
|
|
|
|
|
|
|
|
|
|
|
if (SASL2_FOUND)
|
2007-03-14 15:31:56 +00:00
|
|
|
if (NOT Sasl2_FIND_QUIETLY)
|
2007-04-06 08:51:15 +00:00
|
|
|
message(STATUS "Found Sasl2: ${SASL2_LIBRARIES}")
|
2020-02-15 11:00:57 +01:00
|
|
|
endif()
|
|
|
|
else()
|
2007-04-06 08:51:15 +00:00
|
|
|
if (Sasl2_FIND_REQUIRED)
|
|
|
|
message(FATAL_ERROR "Could not find sasl2 libraries")
|
2020-02-15 11:00:57 +01:00
|
|
|
endif()
|
|
|
|
endif()
|
2006-10-02 15:18:50 +00:00
|
|
|
|
2007-04-06 08:51:15 +00:00
|
|
|
|
2006-10-02 15:18:50 +00:00
|
|
|
MARK_AS_ADVANCED(SASL2_INCLUDE_DIR SASL2_LIBRARIES)
|
|
|
|
|