summaryrefslogtreecommitdiff
path: root/CMake
diff options
context:
space:
mode:
authorng0 <ng0@n0.is>2019-12-20 13:19:40 +0000
committerng0 <ng0@n0.is>2019-12-20 13:19:40 +0000
commitaad5bf997d388e2280af94e540b738364f50b70c (patch)
treedcaeb7a2c44a4fe3b1196db27a69861626a6e2a9 /CMake
parent70745a84166af548bfec23bd1c504143a5393afc (diff)
parent0caf1423e552f2fdd02f2dec23b1e33a36c38486 (diff)
downloadgnurl-aad5bf997d388e2280af94e540b738364f50b70c.tar.gz
gnurl-aad5bf997d388e2280af94e540b738364f50b70c.tar.bz2
gnurl-aad5bf997d388e2280af94e540b738364f50b70c.zip
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'CMake')
-rw-r--r--CMake/FindBearSSL.cmake9
-rw-r--r--CMake/FindNSS.cmake15
2 files changed, 24 insertions, 0 deletions
diff --git a/CMake/FindBearSSL.cmake b/CMake/FindBearSSL.cmake
new file mode 100644
index 000000000..20d239a4f
--- /dev/null
+++ b/CMake/FindBearSSL.cmake
@@ -0,0 +1,9 @@
+find_path(BEARSSL_INCLUDE_DIRS bearssl.h)
+
+find_library(BEARSSL_LIBRARY bearssl)
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(BEARSSL DEFAULT_MSG
+ BEARSSL_INCLUDE_DIRS BEARSSL_LIBRARY)
+
+mark_as_advanced(BEARSSL_INCLUDE_DIRS BEARSSL_LIBRARY)
diff --git a/CMake/FindNSS.cmake b/CMake/FindNSS.cmake
new file mode 100644
index 000000000..277c7dfb2
--- /dev/null
+++ b/CMake/FindNSS.cmake
@@ -0,0 +1,15 @@
+if(UNIX)
+ find_package(PkgConfig QUIET)
+ pkg_search_module(PC_NSS nss)
+endif()
+if(NOT PC_NSS_FOUND)
+ return()
+endif()
+
+set(NSS_LIBRARIES ${PC_NSS_LINK_LIBRARIES})
+set(NSS_INCLUDE_DIRS ${PC_NSS_INCLUDE_DIRS})
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(NSS DEFAULT_MSG NSS_INCLUDE_DIRS NSS_LIBRARIES)
+
+mark_as_advanced(NSS_INCLUDE_DIRS NSS_LIBRARIES)