File: FindSecurity.cmake

package info (click to toggle)
libgit2 1.1.0%2Bdfsg.1-4%2Bdeb11u2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 53,324 kB
  • sloc: ansic: 173,567; sh: 562; python: 351; php: 65; makefile: 50
file content (28 lines) | stat: -rw-r--r-- 763 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# Find Security.framework
# This will define :
#
# SECURITY_FOUND
# SECURITY_LIBRARIES
# SECURITY_LDFLAGS
# SECURITY_HAS_SSLCREATECONTEXT
#

FIND_PATH(SECURITY_INCLUDE_DIR NAMES Security/Security.h)
FIND_LIBRARY(SECURITY_LIBRARIES NAMES Security)
IF (SECURITY_INCLUDE_DIR AND SECURITY_LIBRARIES)
	IF (NOT Security_FIND_QUIETLY)
		MESSAGE(STATUS "Found Security ${SECURITY_LIBRARIES}")
	ENDIF()
	SET(SECURITY_FOUND TRUE)
	SET(SECURITY_LDFLAGS "-framework Security")
	CHECK_LIBRARY_EXISTS("${SECURITY_LIBRARIES}" SSLCreateContext "Security/SecureTransport.h" SECURITY_HAS_SSLCREATECONTEXT)
ENDIF ()

IF (Security_FIND_REQUIRED AND NOT SECURITY_FOUND)
	MESSAGE(FATAL_ERROR "Security not found")
ENDIF()

MARK_AS_ADVANCED(
	SECURITY_INCLUDE_DIR
	SECURITY_LIBRARIES
)