diff options
Diffstat (limited to 'cmake/FindSecurity.cmake')
-rw-r--r-- | cmake/FindSecurity.cmake | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/cmake/FindSecurity.cmake b/cmake/FindSecurity.cmake index a538c02c1..14a2e2dd7 100644 --- a/cmake/FindSecurity.cmake +++ b/cmake/FindSecurity.cmake @@ -7,22 +7,22 @@ # 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 () +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() +if(Security_FIND_REQUIRED AND NOT SECURITY_FOUND) + message(FATAL_ERROR "Security not found") +endif() -MARK_AS_ADVANCED( +mark_as_advanced( SECURITY_INCLUDE_DIR SECURITY_LIBRARIES ) |