]> granicus.if.org Git - curl/commitdiff
cmake: Fix inconsistency regarding mbed TLS include directory
authorTheAssassin <TheAssassin@users.noreply.github.com>
Sun, 4 Jun 2017 23:02:56 +0000 (01:02 +0200)
committerJay Satiro <raysatiro@yahoo.com>
Thu, 8 Jun 2017 22:30:09 +0000 (18:30 -0400)
Previously, one had to set MBEDTLS_INCLUDE_DIR to make CMake find the
headers, but the system complained that mbed TLS wasn't found due to
MBEDTLS_INCLUDE_DIRS (note the trailing s) was not set. This commit
attempts to fix that.

Closes https://github.com/curl/curl/pull/1541

CMakeLists.txt

index 99bfc7695c88cf2215507b39fd7e038e7b8dc6ff..d2e1c2bb6327be43d2aa20fd97f7370064449519 100644 (file)
@@ -380,7 +380,7 @@ if(CMAKE_USE_MBEDTLS)
   set(SSL_ENABLED ON)
   set(USE_MBEDTLS ON)
   list(APPEND CURL_LIBS ${MBEDTLS_LIBRARIES})
-  include_directories(${MBEDTLS_INCLUDE_DIR})
+  include_directories(${MBEDTLS_INCLUDE_DIRS})
 endif()
 
 option(USE_NGHTTP2 "Use Nghttp2 library" OFF)
@@ -688,9 +688,9 @@ elseif(CURL_CA_PATH_AUTODETECT OR CURL_CA_BUNDLE_AUTODETECT)
     endif()
 endif()
 
-if(CURL_CA_PATH_SET AND NOT USE_OPENSSL)
+if(CURL_CA_PATH_SET AND NOT USE_OPENSSL AND NOT USE_MBEDTLS)
     message(FATAL_ERROR
-            "CA path only supported by OpenSSL, GnuTLS or PolarSSL. "
+            "CA path only supported by OpenSSL, GnuTLS or mbed TLS. "
             "Set CURL_CA_PATH=none or enable one of those TLS backends.")
 endif()