view cmake/FindNSS.cmake @ 1367:e7a8ec3185f2

Add nosign option to linux-createpackage and use it in create-dist-package This should prevent doubled signatures in distributed packages which were first signed on the development system with the test key and then from the administrator application.
author Andre Heinecke <andre.heinecke@intevation.de>
date Mon, 24 Nov 2014 14:03:47 +0100
parents 2a1206932f53
children
line wrap: on
line source
# Copyright (C) 2014 by Bundesamt für Sicherheit in der Informationstechnik
# Software engineering by Intevation GmbH
#
# This file is Free Software under the GNU GPL (v>=2)
# and comes with ABSOLUTELY NO WARRANTY!
# See LICENSE.txt for details.
# - Try to find Mozilla NSS

include(FindPkgConfig)
pkg_check_modules (NSS  nss)

if (NOT NSS_FOUND)
  set(NSS_INCLUDES nss.h nspr.h)
  set(NSS_LIBS nss3 nssutil3 smime3 ssl3 plds4 plc4 nspr4)

  foreach(include ${NSS_INCLUDES})

    find_path(NSS_${include}_INCLUDE ${include}
      HINTS ${NSS_INCLUDEDIR}
      ${NSS_INCLUDEDIR}/nspr)

    if(NSS_${include}_INCLUDE)
      set(NSS_INCLUDE_DIRS ${NSS_INCLUDE_DIRS};${NSS_${include}_INCLUDE})
    else(NSS_${include}_INCLUDE)
      message(STATUS "Could not find NSS include: ${include}")
      return()
    endif(NSS_${include}_INCLUDE)

  endforeach(include)

  foreach(lib ${NSS_LIBS})

    find_library(NSS_${lib}_LIBRARIE ${lib}
      HINTS ${NSS_LIBDIR})

    if(NSS_${lib}_LIBRARIE)
      set(NSS_LIBRARIES ${NSS_LIBRARIES};${NSS_${lib}_LIBRARIE})
    else(NSS_${lib}_LIBRARIE)
      message(STATUS "Could not find NSS library: ${lib}")
      return()
    endif(NSS_${lib}_LIBRARIE)

  endforeach(lib)

  include(FindPackageHandleStandardArgs)

  find_package_handle_standard_args(NSS
    REQUIRED_VARS NSS_INCLUDE_DIRS NSS_LIBRARIES
    )
endif (NOT NSS_FOUND)

http://wald.intevation.org/projects/trustbridge/