4
0
mirror of https://github.com/QuasarApp/qca.git synced 2025-05-10 17:59:33 +00:00

Now we can compile qca-nss plugins (need mozilla lib)

svn path=/trunk/kdesupport/qca/; revision=594203
This commit is contained in:
Laurent Montel 2006-10-10 13:47:57 +00:00
parent 9634fe64d1
commit 427a95c8df
3 changed files with 73 additions and 1 deletions

@ -0,0 +1,58 @@
# - Try to find the NSS library
# Once done this will define
#
# NSS_FOUND - system has mozilla-nss lib
# NSS_INCLUDE_DIR - the mozilla-nss include directory
# NSS_LIBRARIES - Link these to use mozilla-nss
# NSS_DEFINITIONS - Compiler switches required for using NSS
#
# Copyright (c) 2006, Laurent Montel, <montel@kde.org>
#
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
if (NSS_INCLUDE_DIR AND NSS_LIBRARIES)
# in cache already
SET(NSS_FOUND TRUE)
else (NSS_INCLUDE_DIR AND NSS_LIBRARIES)
# use pkg-config to get the directories and then use these values
# in the FIND_PATH() and FIND_LIBRARY() calls
INCLUDE(UsePkgConfig)
PKGCONFIG(mozilla-nss _NSSIncDir _NSSLinkDir _NSSLinkFlags _NSSCflags)
set(NSS_DEFINITIONS ${_NSSCflags})
FIND_PATH(NSS_INCLUDE_DIR nss/pk11func.h
${_NSSIncDir}
/usr/include
/usr/local/include
)
FIND_LIBRARY(NSS_LIBRARIES NAMES nss3
PATHS
${_NSSLinkDir}
/usr/lib
/usr/local/lib
)
if (NSS_INCLUDE_DIR AND NSS_LIBRARIES)
set(NSS_FOUND TRUE)
endif (NSS_INCLUDE_DIR AND NSS_LIBRARIES)
if (NSS_FOUND)
if (NOT NSS_FIND_QUIETLY)
message(STATUS "Found NSS: ${NSS_LIBRARIES}")
endif (NOT NSS_FIND_QUIETLY)
else (NSS_FOUND)
if (NSS_FIND_REQUIRED)
message(FATAL_ERROR "Could NOT find NSS")
endif (NSS_FIND_REQUIRED)
endif (NSS_FOUND)
MARK_AS_ADVANCED(NSS_INCLUDE_DIR NSS_LIBRARIES)
endif (NSS_INCLUDE_DIR AND NSS_LIBRARIES)

@ -1,6 +1,7 @@
FIND_PACKAGE(OpenSSL)
find_package(Sasl2)
find_package(Nss)
IF (OPENSSL_FOUND)
ADD_SUBDIRECTORY(qca-openssl)
@ -25,7 +26,9 @@ endif(SASL2_FOUND)
#endif(BOTAN_FOUND)
#ADD_SUBDIRECTORY(qca-gcrypt)
#ADD_SUBDIRECTORY(qca-nss)
if(NSS_FOUND)
ADD_SUBDIRECTORY(qca-nss)
endif(NSS_FOUND)
#ADD_SUBDIRECTORY(qca-sasl)
#ADD_SUBDIRECTORY(qca-tls)

@ -0,0 +1,11 @@
SET(QCA_NSS_SOURCES qca-nss.cpp)
ADD_DEFINITIONS(${NSS_DEFINITIONS})
MY_AUTOMOC( QCA_NSS_SOURCES )
ADD_LIBRARY(qca-nss SHARED ${QCA_NSS_SOURCES})
TARGET_LINK_LIBRARIES(qca-nss ${QT_QTCORE_LIBRARY} qca)
INSTALL(TARGETS qca-nss LIBRARY DESTINATION ${qca_PLUGINSDIR})