]>
Commit | Line | Data |
---|---|---|
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 |
10 | find_path(SECURITY_INCLUDE_DIR NAMES Security/Security.h) |
11 | find_library(SECURITY_LIBRARIES NAMES Security) | |
12 | if(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) | |
19 | endif() | |
eae0bfdc | 20 | |
e579e0f7 MB |
21 | if(Security_FIND_REQUIRED AND NOT SECURITY_FOUND) |
22 | message(FATAL_ERROR "Security not found") | |
23 | endif() | |
eae0bfdc | 24 | |
e579e0f7 | 25 | mark_as_advanced( |
eae0bfdc PP |
26 | SECURITY_INCLUDE_DIR |
27 | SECURITY_LIBRARIES | |
28 | ) |