summaryrefslogtreecommitdiff
path: root/CMake
diff options
context:
space:
mode:
authorPeter Wu <peter@lekensteyn.nl>2019-11-26 22:05:21 +0000
committerPeter Wu <peter@lekensteyn.nl>2019-12-04 21:34:02 +0000
commit87b9337c8f76c21c57b204e88b68c6ecf3bd1ac0 (patch)
tree136d3cd468fb8f08411029bda7ea401679033090 /CMake
parent3b8bbbbd1609c638a3d3d0acb148a33dedb67be3 (diff)
downloadcurl-87b9337c8f76c21c57b204e88b68c6ecf3bd1ac0.tar.gz
CMake: add support for building with the NSS vtls backend
Options are cross-checked with configure.ac and acinclude.m4. Tested on Arch Linux, untested on other platforms like Windows or macOS. Closes #4663 Reviewed-by: Kamil Dudka
Diffstat (limited to 'CMake')
-rw-r--r--CMake/FindNSS.cmake15
1 files changed, 15 insertions, 0 deletions
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)