File: FindSecurity.cmake

package info (click to toggle)
libgit2 1.9.1%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 60,804 kB
  • sloc: ansic: 203,436; javascript: 2,458; sh: 1,763; python: 384; perl: 99; php: 65; makefile: 33
file content (28 lines) | stat: -rw-r--r-- 759 bytes parent folder | download | duplicates (4)
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
)