2 # Once done this will define
4 # NSS_FOUND - system has NSS
5 # NSS_INCLUDE_DIRS - the NSS include directory
6 # NSS_LIBRARIES - Link these to use NSS
7 # NSS_DEFINITIONS - Compiler switches required for using NSS
9 # Copyright (c) 2010 Andreas Schneider <asn@redhat.com>
11 # Redistribution and use is allowed according to the terms of the New
13 # For details see the accompanying COPYING-CMAKE-SCRIPTS file.
17 if (NSS_LIBRARIES AND NSS_INCLUDE_DIRS)
20 else (NSS_LIBRARIES AND NSS_INCLUDE_DIRS)
21 find_package(PkgConfig)
23 pkg_check_modules(_NSS nss)
24 endif (PKG_CONFIG_FOUND)
26 find_path(NSS_INCLUDE_DIR
35 /usr/local/include/nss
41 find_library(SSL3_LIBRARY
52 find_library(SMIME3_LIBRARY
63 find_library(NSS3_LIBRARY
72 /usr/lib/x86_64-linux-gnu
75 find_library(NSSUTIL3_LIBRARY
102 endif (SMIME3_LIBRARY)
111 if (NSSUTIL3_LIBRARY)
116 endif (NSSUTIL3_LIBRARY)
118 include(FindPackageHandleStandardArgs)
119 message(STATUS "NSS_LIBRARIES: ${NSS_LIBRARIES}")
120 message(STATUS "NSS_INCLUDE_DIRS: ${NSS_INCLUDE_DIRS}")
121 find_package_handle_standard_args(NSS DEFAULT_MSG NSS_LIBRARIES NSS_INCLUDE_DIRS)
123 # show the NSS_INCLUDE_DIRS and NSS_LIBRARIES variables only in the advanced view
124 mark_as_advanced(NSS_INCLUDE_DIRS NSS_LIBRARIES)
126 endif (NSS_LIBRARIES AND NSS_INCLUDE_DIRS)