summaryrefslogtreecommitdiff
path: root/CMake
diff options
context:
space:
mode:
authorMichael Maltese <michaeljosephmaltese@gmail.com>2017-01-25 16:41:40 -0800
committerPeter Wu <peter@lekensteyn.nl>2017-03-05 14:42:53 +0100
commitc6a97466b9c24000321ac0bcc96cceabb71b47e7 (patch)
treecb9bdb1bbbe2fb5a3899b27f669ca43cd789bb93 /CMake
parenteb19e89f2e9325b75e0e9ec05da37dc4d9f6fd7f (diff)
downloadcurl-c6a97466b9c24000321ac0bcc96cceabb71b47e7.tar.gz
CMake: Add mbedTLS support
Ref: https://github.com/curl/curl/pull/1228
Diffstat (limited to 'CMake')
-rw-r--r--CMake/FindMbedTLS.cmake13
1 files changed, 13 insertions, 0 deletions
diff --git a/CMake/FindMbedTLS.cmake b/CMake/FindMbedTLS.cmake
new file mode 100644
index 000000000..a91639589
--- /dev/null
+++ b/CMake/FindMbedTLS.cmake
@@ -0,0 +1,13 @@
+find_path(MBEDTLS_INCLUDE_DIRS mbedtls/ssl.h)
+
+find_library(MBEDTLS_LIBRARY mbedtls)
+find_library(MBEDX509_LIBRARY mbedx509)
+find_library(MBEDCRYPTO_LIBRARY mbedcrypto)
+
+set(MBEDTLS_LIBRARIES "${MBEDTLS_LIBRARY}" "${MBEDX509_LIBRARY}" "${MBEDCRYPTO_LIBRARY}")
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(MBEDTLS DEFAULT_MSG
+ MBEDTLS_INCLUDE_DIRS MBEDTLS_LIBRARY MBEDX509_LIBRARY MBEDCRYPTO_LIBRARY)
+
+mark_as_advanced(MBEDTLS_INCLUDE_DIRS MBEDTLS_LIBRARY MBEDX509_LIBRARY MBEDCRYPTO_LIBRARY)