blob: 14a2e2dd7bb8c9dcd005dd69a29728fd50b16a1b (
plain)
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
)
|