aboutsummaryrefslogtreecommitdiff
path: root/CMake
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2020-03-12 17:18:40 +0100
committerDaniel Stenberg <daniel@haxx.se>2020-03-16 22:56:50 +0100
commit37a05418820dfcdb68bc0d535e76e63945b45917 (patch)
tree332700ffeb5c378e8768309a71a7d52f3f0064a1 /CMake
parent95c36fff75883ace6e8e7a89b94362de2dd1857f (diff)
cmake: add support for building with wolfSSL
My working build cmdline: $ cmake -DCMAKE_PREFIX_PATH=$HOME/build-wolfssl -DCMAKE_USE_WOLFSSL=ON . Assisted-by: Brad King Closes #5095
Diffstat (limited to 'CMake')
-rw-r--r--CMake/FindWolfSSL.cmake13
1 files changed, 13 insertions, 0 deletions
diff --git a/CMake/FindWolfSSL.cmake b/CMake/FindWolfSSL.cmake
new file mode 100644
index 000000000..8f9a215d0
--- /dev/null
+++ b/CMake/FindWolfSSL.cmake
@@ -0,0 +1,13 @@
+find_path(WolfSSL_INCLUDE_DIR NAMES wolfssl/ssl.h)
+find_library(WolfSSL_LIBRARY NAMES wolfssl)
+mark_as_advanced(WolfSSL_INCLUDE_DIR WolfSSL_LIBRARY)
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(WolfSSL
+ REQUIRED_VARS WolfSSL_INCLUDE_DIR WolfSSL_LIBRARY
+ )
+
+if(WolfSSL_FOUND)
+ set(WolfSSL_INCLUDE_DIRS ${WolfSSL_INCLUDE_DIR})
+ set(WolfSSL_LIBRARIES ${WolfSSL_LIBRARY})
+endif()