summaryrefslogtreecommitdiffstats
path: root/cmake/Modules/FindNSPR.cmake
diff options
context:
space:
mode:
authorEndi Sukma Dewata <edewata@redhat.com>2012-03-24 02:27:47 -0500
committerEndi Sukma Dewata <edewata@redhat.com>2012-03-26 11:43:54 -0500
commit621d9e5c413e561293d7484b93882d985b3fe15f (patch)
tree638f3d75761c121d9a8fb50b52a12a6686c5ac5c /cmake/Modules/FindNSPR.cmake
parent40d3643b8d91886bf210aa27f711731c81a11e49 (diff)
downloadpki-621d9e5c413e561293d7484b93882d985b3fe15f.tar.gz
pki-621d9e5c413e561293d7484b93882d985b3fe15f.tar.xz
pki-621d9e5c413e561293d7484b93882d985b3fe15f.zip
Removed unnecessary pki folder.
Previously the source code was located inside a pki folder. This folder was created during svn migration and is no longer needed. This folder has now been removed and the contents have been moved up one level. Ticket #131
Diffstat (limited to 'cmake/Modules/FindNSPR.cmake')
-rw-r--r--cmake/Modules/FindNSPR.cmake103
1 files changed, 103 insertions, 0 deletions
diff --git a/cmake/Modules/FindNSPR.cmake b/cmake/Modules/FindNSPR.cmake
new file mode 100644
index 000000000..48f929516
--- /dev/null
+++ b/cmake/Modules/FindNSPR.cmake
@@ -0,0 +1,103 @@
+# - Try to find NSPR
+# Once done this will define
+#
+# NSPR_FOUND - system has NSPR
+# NSPR_INCLUDE_DIRS - the NSPR include directory
+# NSPR_LIBRARIES - Link these to use NSPR
+# NSPR_DEFINITIONS - Compiler switches required for using NSPR
+#
+# Copyright (c) 2010 Andreas Schneider <asn@redhat.com>
+#
+# Redistribution and use is allowed according to the terms of the New
+# BSD license.
+# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
+#
+
+
+if (NSPR_LIBRARIES AND NSPR_INCLUDE_DIRS)
+ # in cache already
+ set(NSPR_FOUND TRUE)
+else (NSPR_LIBRARIES AND NSPR_INCLUDE_DIRS)
+ find_package(PkgConfig)
+ if (PKG_CONFIG_FOUND)
+ pkg_check_modules(_NSPR nspr)
+ endif (PKG_CONFIG_FOUND)
+
+ find_path(NSPR_INCLUDE_DIR
+ NAMES
+ nspr.h
+ PATHS
+ ${_NSPR_INCLUDEDIR}
+ /usr/include
+ /usr/local/include
+ /opt/local/include
+ /sw/include
+ PATH_SUFFIXES
+ nspr4
+ )
+
+ find_library(PLDS4_LIBRARY
+ NAMES
+ plds4
+ PATHS
+ ${_NSPR_LIBDIR}
+ /usr/lib
+ /usr/local/lib
+ /opt/local/lib
+ /sw/lib
+ )
+
+ find_library(PLC4_LIBRARY
+ NAMES
+ plc4
+ PATHS
+ ${_NSPR_LIBDIR}
+ /usr/lib
+ /usr/local/lib
+ /opt/local/lib
+ /sw/lib
+ )
+
+ find_library(NSPR4_LIBRARY
+ NAMES
+ nspr4
+ PATHS
+ ${_NSPR_LIBDIR}
+ /usr/lib
+ /usr/local/lib
+ /opt/local/lib
+ /sw/lib
+ )
+
+ set(NSPR_INCLUDE_DIRS
+ ${NSPR_INCLUDE_DIR}
+ )
+
+ if (PLDS4_LIBRARY)
+ set(NSPR_LIBRARIES
+ ${NSPR_LIBRARIES}
+ ${PLDS4_LIBRARY}
+ )
+ endif (PLDS4_LIBRARY)
+
+ if (PLC4_LIBRARY)
+ set(NSPR_LIBRARIES
+ ${NSPR_LIBRARIES}
+ ${PLC4_LIBRARY}
+ )
+ endif (PLC4_LIBRARY)
+
+ if (NSPR4_LIBRARY)
+ set(NSPR_LIBRARIES
+ ${NSPR_LIBRARIES}
+ ${NSPR4_LIBRARY}
+ )
+ endif (NSPR4_LIBRARY)
+
+ include(FindPackageHandleStandardArgs)
+ find_package_handle_standard_args(NSPR DEFAULT_MSG NSPR_LIBRARIES NSPR_INCLUDE_DIRS)
+
+ # show the NSPR_INCLUDE_DIRS and NSPR_LIBRARIES variables only in the advanced view
+ mark_as_advanced(NSPR_INCLUDE_DIRS NSPR_LIBRARIES)
+
+endif (NSPR_LIBRARIES AND NSPR_INCLUDE_DIRS)