summaryrefslogtreecommitdiff
path: root/cmake/Modules/FindSecurity.cmake
diff options
context:
space:
mode:
authorCarlos Martín Nieto <cmn@dwim.me>2014-11-02 13:23:32 +0100
committerCarlos Martín Nieto <cmn@dwim.me>2015-04-23 17:39:51 +0200
commit6bb54cbff3636e42ae2523afeee08079e5bd1d5f (patch)
tree6179831598ddae4cf8afff74450fa984388b8efb /cmake/Modules/FindSecurity.cmake
parent69c333f997f4a798082e28d5a3e2bc69f8dfdf09 (diff)
downloadlibgit2-6bb54cbff3636e42ae2523afeee08079e5bd1d5f.tar.gz
Add a SecureTransport TLS channel
As an alternative to OpenSSL when we're on OS X. This one can actually take advantage of stacking the streams.
Diffstat (limited to 'cmake/Modules/FindSecurity.cmake')
-rw-r--r--cmake/Modules/FindSecurity.cmake9
1 files changed, 9 insertions, 0 deletions
diff --git a/cmake/Modules/FindSecurity.cmake b/cmake/Modules/FindSecurity.cmake
new file mode 100644
index 000000000..0decdde92
--- /dev/null
+++ b/cmake/Modules/FindSecurity.cmake
@@ -0,0 +1,9 @@
+IF (SECURITY_INCLUDE_DIR AND SECURITY_DIRS)
+ SET(SECURITY_FOUND TRUE)
+ELSE ()
+ FIND_PATH(SECURITY_INCLUDE_DIR NAMES Security/Security.h)
+ FIND_LIBRARY(SECURITY_DIRS NAMES Security)
+ IF (SECURITY_INCLUDE_DIR AND SECURITY_DIRS)
+ SET(SECURITY_FOUND TRUE)
+ ENDIF ()
+ENDIF ()