diff options
author | 2018-01-04 13:43:33 +0800 | |
---|---|---|
committer | 2018-01-05 11:59:39 +0800 | |
commit | 812ff6ca9fcd3e629e49d4328905f33eee8ca3f5 (patch) | |
tree | 04ece7b4da00d9d2f98093774594f4057ae561d4 /src/ceph/cmake/modules/FindNSS.cmake | |
parent | 15280273faafb77777eab341909a3f495cf248d9 (diff) |
initial code repo
This patch creates initial code repo.
For ceph, luminous stable release will be used for base code,
and next changes and optimization for ceph will be added to it.
For opensds, currently any changes can be upstreamed into original
opensds repo (https://github.com/opensds/opensds), and so stor4nfv
will directly clone opensds code to deploy stor4nfv environment.
And the scripts for deployment based on ceph and opensds will be
put into 'ci' directory.
Change-Id: I46a32218884c75dda2936337604ff03c554648e4
Signed-off-by: Qiaowei Ren <qiaowei.ren@intel.com>
Diffstat (limited to 'src/ceph/cmake/modules/FindNSS.cmake')
-rw-r--r-- | src/ceph/cmake/modules/FindNSS.cmake | 126 |
1 files changed, 126 insertions, 0 deletions
diff --git a/src/ceph/cmake/modules/FindNSS.cmake b/src/ceph/cmake/modules/FindNSS.cmake new file mode 100644 index 0000000..a22e0f7 --- /dev/null +++ b/src/ceph/cmake/modules/FindNSS.cmake @@ -0,0 +1,126 @@ +# - Try to find NSS +# Once done this will define +# +# NSS_FOUND - system has NSS +# NSS_INCLUDE_DIRS - the NSS include directory +# NSS_LIBRARIES - Link these to use NSS +# NSS_DEFINITIONS - Compiler switches required for using NSS +# +# 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 (NSS_LIBRARIES AND NSS_INCLUDE_DIRS) + # in cache already + set(NSS_FOUND TRUE) +else (NSS_LIBRARIES AND NSS_INCLUDE_DIRS) + find_package(PkgConfig) + if (PKG_CONFIG_FOUND) + pkg_check_modules(_NSS nss) + endif (PKG_CONFIG_FOUND) + + find_path(NSS_INCLUDE_DIR + NAMES + pk11pub.h + PATHS + ${_NSS_INCLUDEDIR} + /usr/include + /usr/local/include + /opt/local/include + /sw/include + /usr/local/include/nss + PATH_SUFFIXES + nss3 + nss + ) + + find_library(SSL3_LIBRARY + NAMES + ssl3 + PATHS + ${_NSS_LIBDIR} + /usr/lib + /usr/local/lib + /opt/local/lib + /sw/lib + ) + + find_library(SMIME3_LIBRARY + NAMES + smime3 + PATHS + ${_NSS_LIBDIR} + /usr/lib + /usr/local/lib + /opt/local/lib + /sw/lib + ) + + find_library(NSS3_LIBRARY + NAMES + nss3 + PATHS + ${_NSS_LIBDIR} + /usr/lib + /usr/local/lib + /opt/local/lib + /sw/lib + /usr/lib/x86_64-linux-gnu + ) + + find_library(NSSUTIL3_LIBRARY + NAMES + nssutil3 + PATHS + ${_NSS_LIBDIR} + /usr/lib + /usr/local/lib + /opt/local/lib + /sw/lib + ) + + set(NSS_INCLUDE_DIRS + ${NSS_INCLUDE_DIR} + ) + + if (SSL3_LIBRARY) + set(NSS_LIBRARIES + ${NSS_LIBRARIES} + ${SSL3_LIBRARY} + ) + endif (SSL3_LIBRARY) + + if (SMIME3_LIBRARY) + set(NSS_LIBRARIES + ${NSS_LIBRARIES} + ${SMIME3_LIBRARY} + ) + endif (SMIME3_LIBRARY) + + if (NSS3_LIBRARY) + set(NSS_LIBRARIES + ${NSS_LIBRARIES} + ${NSS3_LIBRARY} + ) + endif (NSS3_LIBRARY) + + if (NSSUTIL3_LIBRARY) + set(NSS_LIBRARIES + ${NSS_LIBRARIES} + ${NSSUTIL3_LIBRARY} + ) + endif (NSSUTIL3_LIBRARY) + + include(FindPackageHandleStandardArgs) + message(STATUS "NSS_LIBRARIES: ${NSS_LIBRARIES}") + message(STATUS "NSS_INCLUDE_DIRS: ${NSS_INCLUDE_DIRS}") + find_package_handle_standard_args(NSS DEFAULT_MSG NSS_LIBRARIES NSS_INCLUDE_DIRS) + + # show the NSS_INCLUDE_DIRS and NSS_LIBRARIES variables only in the advanced view + mark_as_advanced(NSS_INCLUDE_DIRS NSS_LIBRARIES) + +endif (NSS_LIBRARIES AND NSS_INCLUDE_DIRS) |