]> git.proxmox.com Git - libgit2.git/blame - cmake/FindSecurity.cmake
New upstream version 1.4.3+dfsg.1
[libgit2.git] / cmake / FindSecurity.cmake
CommitLineData
eae0bfdc
PP
1# Find Security.framework
2# This will define :
3#
4# SECURITY_FOUND
5# SECURITY_LIBRARIES
6# SECURITY_LDFLAGS
7# SECURITY_HAS_SSLCREATECONTEXT
8#
9
e579e0f7
MB
10find_path(SECURITY_INCLUDE_DIR NAMES Security/Security.h)
11find_library(SECURITY_LIBRARIES NAMES Security)
12if(SECURITY_INCLUDE_DIR AND SECURITY_LIBRARIES)
13 if(NOT Security_FIND_QUIETLY)
14 message(STATUS "Found Security ${SECURITY_LIBRARIES}")
15 endif()
16 set(SECURITY_FOUND TRUE)
17 set(SECURITY_LDFLAGS "-framework Security")
18 check_library_exists("${SECURITY_LIBRARIES}" SSLCreateContext "Security/SecureTransport.h" SECURITY_HAS_SSLCREATECONTEXT)
19endif()
eae0bfdc 20
e579e0f7
MB
21if(Security_FIND_REQUIRED AND NOT SECURITY_FOUND)
22 message(FATAL_ERROR "Security not found")
23endif()
eae0bfdc 24
e579e0f7 25mark_as_advanced(
eae0bfdc
PP
26 SECURITY_INCLUDE_DIR
27 SECURITY_LIBRARIES
28)