mirror of
https://github.com/QuasarApp/qca.git
synced 2025-04-26 11:34:32 +00:00
Build static QCA
Added new cmake variable SHARED_LIBRARY. By default is on. When it is off QCA library, plugins, tools, examples and unittests will be built as static. Also if is used static Qt plugins will be built as static. Tested with Qt4.
This commit is contained in:
parent
4edfa3fcba
commit
6d690c0070
@ -11,6 +11,7 @@ cmake_minimum_required(VERSION 2.6.0)
|
||||
option(BUILD_TESTS "Create test" ON)
|
||||
option(BUILD_TOOLS "Compile mozcerts and qcatool" ON)
|
||||
set(BUILD_PLUGINS "auto" CACHE STRING "Plugins for building (also possible values: none, all and auto)")
|
||||
option(SHARED_LIBRARY "Build shared library" ON)
|
||||
|
||||
string(TOLOWER "${BUILD_PLUGINS}" BUILD_PLUGINS)
|
||||
if(NOT BUILD_PLUGINS)
|
||||
@ -38,12 +39,33 @@ if (Qt5Core_FOUND)
|
||||
else()
|
||||
set(QT_MIN_VERSION "4.7.0")
|
||||
set(QT_USE_IMPORTED_TARGETS ON)
|
||||
find_package(Qt4 REQUIRED QtCore)
|
||||
if(BUILD_TESTS)
|
||||
find_package(Qt4 REQUIRED QtCore QtNetwork QtTest)
|
||||
else(BUILD_TESTS)
|
||||
find_package(Qt4 REQUIRED QtCore)
|
||||
endif(BUILD_TESTS)
|
||||
|
||||
# properly set up compile flags (QT_DEBUG/QT_NO_DEBUG, ...)
|
||||
include(${QT_USE_FILE})
|
||||
setup_qt4_dirs()
|
||||
endif()
|
||||
|
||||
if(SHARED_LIBRARY)
|
||||
set(LIBRARY_TYPE "SHARED")
|
||||
else(SHARED_LIBRARY)
|
||||
set(LIBRARY_TYPE "STATIC")
|
||||
endif(SHARED_LIBRARY)
|
||||
|
||||
# QCA can be shared but plugins will be static
|
||||
# if Qt is static.
|
||||
if(NOT SHARED_LIBRARY OR QT_IS_STATIC)
|
||||
set(STATIC_PLUGINS ON)
|
||||
add_definitions(-DQT_STATICPLUGIN)
|
||||
set(PLUGIN_TYPE "STATIC")
|
||||
else(NOT SHARED_LIBRARY OR QT_IS_STATIC)
|
||||
set(PLUGIN_TYPE "MODULE")
|
||||
endif(NOT SHARED_LIBRARY OR QT_IS_STATIC)
|
||||
|
||||
set(QCA_LIB_MAJOR_VERSION "2")
|
||||
set(QCA_LIB_MINOR_VERSION "0")
|
||||
set(QCA_LIB_PATCH_VERSION "3")
|
||||
@ -81,6 +103,8 @@ endif (CMAKE_COMPILER_IS_GNUCXX)
|
||||
|
||||
add_definitions (${QT_DEFINITIONS})
|
||||
include_directories("include/QtCrypto/")
|
||||
# for generated files
|
||||
include_directories(${CMAKE_BINARY_DIR})
|
||||
|
||||
# uninstall target
|
||||
configure_file(
|
||||
@ -224,6 +248,18 @@ install(FILES "${CMAKE_BINARY_DIR}/${QCA_TOOL_NAME}.1" DESTINATION "${QCA_MAN_IN
|
||||
|
||||
add_subdirectory(src)
|
||||
add_subdirectory(plugins)
|
||||
|
||||
if(STATIC_PLUGINS)
|
||||
# Generate header with static plugins list
|
||||
file(WRITE "${CMAKE_BINARY_DIR}/import_plugins.h" "#include <QtPlugin>\n")
|
||||
foreach(PLUGIN IN LISTS PLUGINS)
|
||||
if(WITH_${PLUGIN}_PLUGIN_INTERNAL)
|
||||
string(REPLACE "-" "_" IMPORT_NAME "qca-${PLUGIN}")
|
||||
file(APPEND "${CMAKE_BINARY_DIR}/import_plugins.h" "Q_IMPORT_PLUGIN(${IMPORT_NAME})\n")
|
||||
endif(WITH_${PLUGIN}_PLUGIN_INTERNAL)
|
||||
endforeach(PLUGIN IN LISTS PLUGINS)
|
||||
endif(STATIC_PLUGINS)
|
||||
|
||||
if(BUILD_TESTS)
|
||||
enable_testing()
|
||||
add_subdirectory(unittest)
|
||||
|
@ -68,3 +68,27 @@ endmacro(enable_plugin)
|
||||
macro(disable_plugin PLUGIN)
|
||||
set_enabled_plugin(${PLUGIN} "off")
|
||||
endmacro(disable_plugin)
|
||||
|
||||
# it used to build examples and tools
|
||||
macro(target_link_qca_libraries TARGET)
|
||||
# Link with QCA library
|
||||
target_link_libraries(${TARGET} ${QT_QTCORE_LIBRARY})
|
||||
target_link_libraries(${TARGET} ${QCA_LIB_NAME})
|
||||
|
||||
# Statically link with all enabled QCA plugins
|
||||
if(STATIC_PLUGINS)
|
||||
target_link_libraries(${TARGET} ${QT_QTCORE_LIB_DEPENDENCIES})
|
||||
foreach(PLUGIN IN LISTS PLUGINS)
|
||||
# Check plugin for enabled
|
||||
if(WITH_${PLUGIN}_PLUGIN_INTERNAL)
|
||||
target_link_libraries(${TARGET} qca-${PLUGIN})
|
||||
endif(WITH_${PLUGIN}_PLUGIN_INTERNAL)
|
||||
endforeach(PLUGIN)
|
||||
endif(STATIC_PLUGINS)
|
||||
endmacro(target_link_qca_libraries)
|
||||
|
||||
# it used to build unittests
|
||||
macro(target_link_qca_test_libraries TARGET)
|
||||
target_link_qca_libraries(${TARGET})
|
||||
target_link_libraries(${TARGET} ${QT_QTTEST_LIBRARY})
|
||||
endmacro(target_link_qca_test_libraries)
|
||||
|
@ -2,5 +2,4 @@ set(aes-cmac_bin_SRCS aes-cmac.cpp)
|
||||
|
||||
add_executable(aes-cmac ${aes-cmac_bin_SRCS})
|
||||
|
||||
target_link_libraries( aes-cmac ${QCA_LIB_NAME} ${QT_QTGUI_LIBRARY})
|
||||
|
||||
target_link_qca_libraries(aes-cmac)
|
||||
|
@ -25,6 +25,10 @@
|
||||
#include <QCoreApplication>
|
||||
#include <QDebug>
|
||||
|
||||
#ifdef QT_STATICPLUGIN
|
||||
#include "import_plugins.h"
|
||||
#endif
|
||||
|
||||
class AESCMACContext : public QCA::MACContext
|
||||
{
|
||||
public:
|
||||
|
@ -2,5 +2,4 @@ set(base64test_bin_SRCS base64test.cpp)
|
||||
|
||||
add_executable(base64test ${base64test_bin_SRCS})
|
||||
|
||||
target_link_libraries( base64test ${QCA_LIB_NAME} ${QT_QTCORE_LIBRARY})
|
||||
|
||||
target_link_qca_libraries(base64test)
|
||||
|
@ -26,6 +26,10 @@
|
||||
|
||||
#include <iostream>
|
||||
|
||||
#ifdef QT_STATICPLUGIN
|
||||
#include "import_plugins.h"
|
||||
#endif
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
QCoreApplication(argc, argv);
|
||||
|
@ -2,5 +2,4 @@ set(certtest_bin_SRCS certtest.cpp)
|
||||
|
||||
add_executable(certtest ${certtest_bin_SRCS})
|
||||
|
||||
target_link_libraries( certtest ${QCA_LIB_NAME} ${QT_QTGUI_LIBRARY})
|
||||
|
||||
target_link_qca_libraries(certtest)
|
||||
|
@ -27,6 +27,10 @@
|
||||
|
||||
#include <iostream>
|
||||
|
||||
#ifdef QT_STATICPLUGIN
|
||||
#include "import_plugins.h"
|
||||
#endif
|
||||
|
||||
// dump out information about some part of the certificate
|
||||
// we use this same approach for information about the subject
|
||||
// of the certificate, and also about the issuer of the certificate
|
||||
|
@ -2,5 +2,4 @@ set(ciphertest_bin_SRCS ciphertest.cpp)
|
||||
|
||||
add_executable(ciphertest ${ciphertest_bin_SRCS})
|
||||
|
||||
target_link_libraries( ciphertest ${QCA_LIB_NAME} ${QT_QTGUI_LIBRARY})
|
||||
|
||||
target_link_qca_libraries(ciphertest)
|
||||
|
@ -26,6 +26,10 @@
|
||||
|
||||
#include <QCoreApplication>
|
||||
|
||||
#ifdef QT_STATICPLUGIN
|
||||
#include "import_plugins.h"
|
||||
#endif
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
// the Initializer object sets things up, and
|
||||
|
@ -2,5 +2,4 @@ set(cmsexample_bin_SRCS cmsexample.cpp)
|
||||
|
||||
add_executable(cmsexample ${cmsexample_bin_SRCS})
|
||||
|
||||
target_link_libraries( cmsexample ${QCA_LIB_NAME} ${QT_QTGUI_LIBRARY})
|
||||
|
||||
target_link_qca_libraries(cmsexample)
|
||||
|
@ -26,6 +26,10 @@
|
||||
#include <QCoreApplication>
|
||||
#include <QDebug>
|
||||
|
||||
#ifdef QT_STATICPLUGIN
|
||||
#include "import_plugins.h"
|
||||
#endif
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
// the Initializer object sets things up, and
|
||||
|
@ -31,6 +31,10 @@
|
||||
#include "pkcs11configdlg/pkcs11configdlg.h"
|
||||
#include "certitem.h"
|
||||
|
||||
#ifdef QT_STATICPLUGIN
|
||||
#include "import_plugins.h"
|
||||
#endif
|
||||
|
||||
#define VERSION "1.0.0"
|
||||
|
||||
class Icons
|
||||
|
@ -4,5 +4,4 @@ MY_AUTOMOC( eventhandlerdemo_bin_SRCS)
|
||||
|
||||
add_executable(eventhandlerdemo ${eventhandlerdemo_bin_SRCS})
|
||||
|
||||
target_link_libraries( eventhandlerdemo ${QCA_LIB_NAME} ${QT_QTCORE_LIBRARY})
|
||||
|
||||
target_link_qca_libraries(eventhandlerdemo)
|
||||
|
@ -26,6 +26,10 @@
|
||||
|
||||
#include <iostream>
|
||||
|
||||
#ifdef QT_STATICPLUGIN
|
||||
#include "import_plugins.h"
|
||||
#endif
|
||||
|
||||
/**
|
||||
We need a class on the client side to handle password requests.
|
||||
*/
|
||||
|
@ -2,5 +2,4 @@ set(hashtest_bin_SRCS hashtest.cpp)
|
||||
|
||||
add_executable(hashtest ${hashtest_bin_SRCS})
|
||||
|
||||
target_link_libraries( hashtest ${QCA_LIB_NAME} ${QT_QTGUI_LIBRARY})
|
||||
|
||||
target_link_qca_libraries(hashtest)
|
||||
|
@ -26,6 +26,10 @@
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#ifdef QT_STATICPLUGIN
|
||||
#include "import_plugins.h"
|
||||
#endif
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
// the Initializer object sets things up, and
|
||||
|
@ -2,5 +2,4 @@ set(hextest_bin_SRCS hextest.cpp)
|
||||
|
||||
add_executable(hextest ${hextest_bin_SRCS})
|
||||
|
||||
target_link_libraries( hextest ${QCA_LIB_NAME} ${QT_QTGUI_LIBRARY})
|
||||
|
||||
target_link_qca_libraries(hextest)
|
||||
|
@ -26,6 +26,10 @@
|
||||
|
||||
#include <iostream>
|
||||
|
||||
#ifdef QT_STATICPLUGIN
|
||||
#include "import_plugins.h"
|
||||
#endif
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
// the Initializer object sets things up, and
|
||||
|
@ -4,5 +4,4 @@ MY_AUTOMOC( keyloader_bin_SRCS )
|
||||
|
||||
add_executable(keyloader ${keyloader_bin_SRCS})
|
||||
|
||||
target_link_libraries( keyloader ${QCA_LIB_NAME} ${QT_QTCORE_LIBRARY})
|
||||
|
||||
target_link_qca_libraries(keyloader)
|
||||
|
@ -27,6 +27,10 @@
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#ifdef QT_STATICPLUGIN
|
||||
#include "import_plugins.h"
|
||||
#endif
|
||||
|
||||
class PassphraseHandler: public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
@ -2,5 +2,4 @@ set(mactest_bin_SRCS mactest.cpp)
|
||||
|
||||
add_executable(mactest ${mactest_bin_SRCS})
|
||||
|
||||
target_link_libraries( mactest ${QCA_LIB_NAME} ${QT_QTGUI_LIBRARY})
|
||||
|
||||
target_link_qca_libraries(mactest)
|
||||
|
@ -28,6 +28,10 @@
|
||||
// needed for printf
|
||||
#include<stdio.h>
|
||||
|
||||
#ifdef QT_STATICPLUGIN
|
||||
#include "import_plugins.h"
|
||||
#endif
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
// the Initializer object sets things up, and
|
||||
|
@ -2,6 +2,6 @@ set(md5crypt_bin_SRCS md5crypt.cpp)
|
||||
|
||||
add_executable(md5crypt ${md5crypt_bin_SRCS})
|
||||
|
||||
#add "crypt" to the libs if you are trying the crypt() equivalent
|
||||
target_link_libraries( md5crypt ${QCA_LIB_NAME} ${QT_QTGUI_LIBRARY})
|
||||
target_link_qca_libraries(md5crypt)
|
||||
|
||||
#add "crypt" to the libs if you are trying the crypt() equivalent
|
||||
|
@ -30,6 +30,10 @@
|
||||
#include <QtDebug>
|
||||
#include <stdio.h>
|
||||
|
||||
#ifdef QT_STATICPLUGIN
|
||||
#include "import_plugins.h"
|
||||
#endif
|
||||
|
||||
QString to64 ( long v , int size )
|
||||
{
|
||||
|
||||
|
@ -2,5 +2,4 @@ set(providertest_bin_SRCS providertest.cpp)
|
||||
|
||||
add_executable(providertest ${providertest_bin_SRCS})
|
||||
|
||||
target_link_libraries( providertest ${QCA_LIB_NAME} ${QT_QTGUI_LIBRARY})
|
||||
|
||||
target_link_qca_libraries(providertest)
|
||||
|
@ -26,6 +26,10 @@
|
||||
#include <iostream>
|
||||
#include <qstringlist.h>
|
||||
|
||||
#ifdef QT_STATICPLUGIN
|
||||
#include "import_plugins.h"
|
||||
#endif
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
// the Initializer object sets things up, and
|
||||
|
@ -2,5 +2,4 @@ set(publickeyexample_bin_SRCS publickeyexample.cpp)
|
||||
|
||||
add_executable(publickeyexample ${publickeyexample_bin_SRCS})
|
||||
|
||||
target_link_libraries( publickeyexample ${QCA_LIB_NAME} ${QT_QTGUI_LIBRARY})
|
||||
|
||||
target_link_qca_libraries(publickeyexample)
|
||||
|
@ -27,6 +27,9 @@
|
||||
|
||||
#include <iostream>
|
||||
|
||||
#ifdef QT_STATICPLUGIN
|
||||
#include "import_plugins.h"
|
||||
#endif
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
|
@ -2,5 +2,4 @@ set(randomtest_bin_SRCS randomtest.cpp)
|
||||
|
||||
add_executable(randomtest ${randomtest_bin_SRCS})
|
||||
|
||||
target_link_libraries( randomtest ${QCA_LIB_NAME} ${QT_QTGUI_LIBRARY})
|
||||
|
||||
target_link_qca_libraries(randomtest)
|
||||
|
@ -27,6 +27,10 @@
|
||||
|
||||
#include <iostream>
|
||||
|
||||
#ifdef QT_STATICPLUGIN
|
||||
#include "import_plugins.h"
|
||||
#endif
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
// the Initializer object sets things up, and
|
||||
|
@ -2,5 +2,4 @@ set(rsatest_bin_SRCS rsatest.cpp)
|
||||
|
||||
add_executable(rsatest ${rsatest_bin_SRCS})
|
||||
|
||||
target_link_libraries( rsatest ${QCA_LIB_NAME} ${QT_QTGUI_LIBRARY})
|
||||
|
||||
target_link_qca_libraries(rsatest)
|
||||
|
@ -25,6 +25,10 @@
|
||||
|
||||
#include <iostream>
|
||||
|
||||
#ifdef QT_STATICPLUGIN
|
||||
#include "import_plugins.h"
|
||||
#endif
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
// The Initializer object sets things up, and also
|
||||
|
@ -4,4 +4,5 @@ MY_AUTOMOC( saslclient_bin_SRCS)
|
||||
|
||||
add_executable(saslclient ${saslclient_bin_SRCS})
|
||||
|
||||
target_link_libraries( saslclient ${QCA_LIB_NAME} ${QT_QTGUI_LIBRARY} ${QT_QTNETWORK_LIBRARY})
|
||||
target_link_qca_libraries(saslclient)
|
||||
target_link_libraries(saslclient ${QT_QTNETWORK_LIBRARY})
|
||||
|
@ -29,6 +29,10 @@
|
||||
// QtCrypto has the declarations for all of QCA
|
||||
#include <QtCrypto>
|
||||
|
||||
#ifdef QT_STATICPLUGIN
|
||||
#include "import_plugins.h"
|
||||
#endif
|
||||
|
||||
static QString prompt(const QString &s)
|
||||
{
|
||||
printf("* %s ", qPrintable(s));
|
||||
|
@ -4,4 +4,5 @@ MY_AUTOMOC( saslserver_bin_SRCS)
|
||||
|
||||
add_executable(saslserver ${saslserver_bin_SRCS})
|
||||
|
||||
target_link_libraries( saslserver ${QCA_LIB_NAME} ${QT_QTGUI_LIBRARY} ${QT_QTNETWORK_LIBRARY})
|
||||
target_link_qca_libraries(saslserver)
|
||||
target_link_libraries(saslserver ${QT_QTNETWORK_LIBRARY})
|
||||
|
@ -29,6 +29,10 @@
|
||||
// QtCrypto has the declarations for all of QCA
|
||||
#include <QtCrypto>
|
||||
|
||||
#ifdef QT_STATICPLUGIN
|
||||
#include "import_plugins.h"
|
||||
#endif
|
||||
|
||||
static QString socketErrorToString(QAbstractSocket::SocketError x)
|
||||
{
|
||||
QString s;
|
||||
|
@ -4,5 +4,5 @@ MY_AUTOMOC( sslservtest_bin_SRCS )
|
||||
|
||||
add_executable(sslservtest ${sslservtest_bin_SRCS})
|
||||
|
||||
target_link_libraries( sslservtest ${QCA_LIB_NAME} ${QT_QTGUI_LIBRARY} ${QT_QTNETWORK_LIBRARY})
|
||||
|
||||
target_link_qca_libraries(sslservtest)
|
||||
target_link_libraries(sslservtest ${QT_QTNETWORK_LIBRARY})
|
||||
|
@ -29,6 +29,10 @@
|
||||
#include <QTcpSocket>
|
||||
#include <QTimer>
|
||||
|
||||
#ifdef QT_STATICPLUGIN
|
||||
#include "import_plugins.h"
|
||||
#endif
|
||||
|
||||
char pemdata_cert[] =
|
||||
"-----BEGIN CERTIFICATE-----\n"
|
||||
"MIICeTCCAeKgAwIBAgIRAKKKnOj6Aarmwf0phApitVAwDQYJKoZIhvcNAQEFBQAw\n"
|
||||
|
@ -1,9 +1,8 @@
|
||||
set(ssltest_bin_SRCS ssltest.cpp)
|
||||
|
||||
|
||||
MY_AUTOMOC( ssltest_bin_SRCS)
|
||||
|
||||
add_executable(ssltest ${ssltest_bin_SRCS})
|
||||
|
||||
target_link_libraries( ssltest ${QCA_LIB_NAME} ${QT_QTGUI_LIBRARY} ${QT_QTNETWORK_LIBRARY})
|
||||
|
||||
target_link_qca_libraries(ssltest)
|
||||
target_link_libraries(ssltest ${QT_QTNETWORK_LIBRARY})
|
||||
|
@ -24,6 +24,10 @@
|
||||
#include <QCoreApplication>
|
||||
#include <QTcpSocket>
|
||||
|
||||
#ifdef QT_STATICPLUGIN
|
||||
#include "import_plugins.h"
|
||||
#endif
|
||||
|
||||
char exampleCA_cert[] =
|
||||
"-----BEGIN CERTIFICATE-----\n"
|
||||
"MIICSzCCAbSgAwIBAgIBADANBgkqhkiG9w0BAQUFADA4MRMwEQYDVQQDEwpFeGFt\n"
|
||||
|
@ -1,10 +1,9 @@
|
||||
set(tlssocket_bin_moc_SRCS tlssocket.cpp)
|
||||
set(tlssocket_bin_nonmoc_SRCS main.cpp)
|
||||
|
||||
|
||||
MY_AUTOMOC( tlssocket_bin_moc_SRCS)
|
||||
|
||||
add_executable(tlssocket ${tlssocket_bin_moc_SRCS} ${tlssocket_bin_nonmoc_SRCS})
|
||||
|
||||
target_link_libraries( tlssocket ${QCA_LIB_NAME} ${QT_QTGUI_LIBRARY} ${QT_QTNETWORK_LIBRARY})
|
||||
|
||||
target_link_qca_libraries(tlssocket)
|
||||
target_link_libraries(tlssocket ${QT_QTNETWORK_LIBRARY})
|
||||
|
@ -21,6 +21,10 @@
|
||||
|
||||
#include "tlssocket.h"
|
||||
|
||||
#ifdef QT_STATICPLUGIN
|
||||
#include "import_plugins.h"
|
||||
#endif
|
||||
|
||||
class TLSSocket::Private : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
@ -10,7 +10,7 @@ if(BOTAN_FOUND)
|
||||
set(QCA_BOTAN_SOURCES qca-botan.cpp)
|
||||
add_definitions(${BOTAN_CFLAGS})
|
||||
my_automoc(QCA_BOTAN_SOURCES)
|
||||
add_library(qca-botan MODULE ${QCA_BOTAN_SOURCES})
|
||||
add_library(qca-botan ${PLUGIN_TYPE} ${QCA_BOTAN_SOURCES})
|
||||
target_link_libraries(qca-botan ${QT_QTCORE_LIBRARY} ${QCA_LIB_NAME} ${BOTAN_LIBRARIES})
|
||||
|
||||
install(TARGETS qca-botan
|
||||
|
@ -10,7 +10,7 @@ if(SASL2_FOUND)
|
||||
set(QCA_SASL_SOURCES qca-cyrus-sasl.cpp)
|
||||
include_directories( ${SASL2_INCLUDE_DIR} )
|
||||
my_automoc( QCA_SASL_SOURCES )
|
||||
add_library(qca-cyrus-sasl MODULE ${QCA_SASL_SOURCES})
|
||||
add_library(qca-cyrus-sasl ${PLUGIN_TYPE} ${QCA_SASL_SOURCES})
|
||||
target_link_libraries(qca-cyrus-sasl ${QT_QTCORE_LIBRARY} ${QCA_LIB_NAME} ${SASL2_LIBRARIES})
|
||||
|
||||
install(TARGETS qca-cyrus-sasl
|
||||
|
@ -20,7 +20,7 @@ if(LIBGCRYPT_FOUND)
|
||||
set(QCA_GCRYPT_SOURCES qca-gcrypt.cpp)
|
||||
add_definitions(${LIBGCRYPT_CFLAGS})
|
||||
my_automoc(QCA_GCRYPT_SOURCES)
|
||||
add_library(qca-gcrypt MODULE ${QCA_GCRYPT_SOURCES})
|
||||
add_library(qca-gcrypt ${PLUGIN_TYPE} ${QCA_GCRYPT_SOURCES})
|
||||
target_link_libraries(qca-gcrypt ${QT_QTCORE_LIBRARY} ${QCA_LIB_NAME} ${LIBGCRYPT_LIBRARIES})
|
||||
|
||||
install(TARGETS qca-gcrypt
|
||||
|
@ -13,7 +13,7 @@ if(QCA_GPG_EXECUTABLE)
|
||||
qt4_wrap_cpp(EXTRA_GNUPG_SOURCES gpgproc/gpgproc.h)
|
||||
qt4_wrap_cpp(EXTRA_GNUPG_SOURCES gpgproc/sprocess.h)
|
||||
|
||||
add_library(qca-gnupg MODULE ${QCA_GNUPG_MOC_SOURCES} gpgproc/sprocess.cpp ${EXTRA_GNUPG_SOURCES})
|
||||
add_library(qca-gnupg ${PLUGIN_TYPE} ${QCA_GNUPG_MOC_SOURCES} gpgproc/sprocess.cpp ${EXTRA_GNUPG_SOURCES})
|
||||
include_directories(gpgproc)
|
||||
target_link_libraries(qca-gnupg ${QT_QTCORE_LIBRARY} ${QCA_LIB_NAME})
|
||||
|
||||
|
@ -4,7 +4,7 @@ enable_plugin("logger")
|
||||
set(QCA_LOGGER_SOURCES qca-logger.cpp)
|
||||
my_automoc( QCA_LOGGER_SOURCES )
|
||||
|
||||
add_library(qca-logger MODULE ${QCA_LOGGER_SOURCES})
|
||||
add_library(qca-logger ${PLUGIN_TYPE} ${QCA_LOGGER_SOURCES})
|
||||
|
||||
add_definitions(${LOGGERH_DEFINITIONS})
|
||||
include_directories(${LOGGERH_INCLUDE_DIR})
|
||||
|
@ -11,7 +11,7 @@ if(NSS_FOUND)
|
||||
add_definitions(${NSS_DEFINITIONS})
|
||||
include_directories(${NSS_INCLUDE_DIR})
|
||||
my_automoc( QCA_NSS_SOURCES )
|
||||
add_library(qca-nss MODULE ${QCA_NSS_SOURCES})
|
||||
add_library(qca-nss ${PLUGIN_TYPE} ${QCA_NSS_SOURCES})
|
||||
target_link_libraries(qca-nss ${QT_QTCORE_LIBRARY} ${QCA_LIB_NAME} ${NSS_LIBRARIES})
|
||||
|
||||
install(TARGETS qca-nss
|
||||
|
@ -29,7 +29,7 @@ if(OPENSSL_FOUND)
|
||||
|
||||
my_automoc( QCA_OSSL_SOURCES )
|
||||
|
||||
add_library(qca-ossl MODULE ${QCA_OSSL_SOURCES})
|
||||
add_library(qca-ossl ${PLUGIN_TYPE} ${QCA_OSSL_SOURCES})
|
||||
include_directories(${OPENSSL_INCLUDE_DIR})
|
||||
target_link_libraries(qca-ossl ${QT_QTCORE_LIBRARY})
|
||||
target_link_libraries(qca-ossl ${QCA_LIB_NAME})
|
||||
|
@ -13,7 +13,7 @@ if(OPENSSL_FOUND AND PKCS11H_FOUND)
|
||||
set(QCA_PKCS11_SOURCES qca-pkcs11.cpp)
|
||||
my_automoc( QCA_PKCS11_SOURCES )
|
||||
|
||||
add_library(qca-pkcs11 MODULE ${QCA_PKCS11_SOURCES})
|
||||
add_library(qca-pkcs11 ${PLUGIN_TYPE} ${QCA_PKCS11_SOURCES})
|
||||
|
||||
add_definitions(${PKCS11H_DEFINITIONS})
|
||||
include_directories(${PKCS11H_INCLUDE_DIR})
|
||||
|
@ -4,7 +4,7 @@ enable_plugin("softstore")
|
||||
set(QCA_SOFTSTORE_SOURCES qca-softstore.cpp)
|
||||
my_automoc( QCA_SOFTSTORE_SOURCES )
|
||||
|
||||
add_library(qca-softstore MODULE ${QCA_SOFTSTORE_SOURCES})
|
||||
add_library(qca-softstore ${PLUGIN_TYPE} ${QCA_SOFTSTORE_SOURCES})
|
||||
|
||||
add_definitions(${SOFTSTOREH_DEFINITIONS})
|
||||
include_directories(${SOFTSTOREH_INCLUDE_DIR})
|
||||
|
@ -129,7 +129,7 @@ qt4_wrap_cpp( SOURCES "${qca_INCLUDEDIR}/QtCrypto/qca_support.h")
|
||||
qt4_wrap_cpp( SOURCES "${qca_INCLUDEDIR}/QtCrypto/qpipe.h")
|
||||
qt4_wrap_cpp( SOURCES "qca_safeobj.h")
|
||||
|
||||
ADD_LIBRARY(${QCA_LIB_NAME} SHARED ${SOURCES})
|
||||
ADD_LIBRARY(${QCA_LIB_NAME} ${LIBRARY_TYPE} ${SOURCES})
|
||||
TARGET_LINK_LIBRARIES(${QCA_LIB_NAME} ${QT_QTCORE_LIBRARY})
|
||||
|
||||
if(WIN32)
|
||||
|
@ -5,6 +5,6 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
|
||||
|
||||
add_executable(${MOZCERTS_NAME} ${mozcerts_bin_SRCS})
|
||||
|
||||
target_link_libraries( ${MOZCERTS_NAME} ${QCA_LIB_NAME} ${QT_QTGUI_LIBRARY})
|
||||
target_link_qca_libraries(${MOZCERTS_NAME})
|
||||
|
||||
install(TARGETS ${MOZCERTS_NAME} DESTINATION "${QCA_BINARY_INSTALL_DIR}")
|
||||
|
@ -9,6 +9,6 @@ set(qcatool_bin_SRCS ${qcatool_moc_SRCS})
|
||||
|
||||
add_executable(${QCA_TOOL_NAME} ${qcatool_bin_SRCS})
|
||||
|
||||
target_link_libraries( ${QCA_TOOL_NAME} ${QCA_LIB_NAME} ${QT_QTCORE_LIBRARY})
|
||||
target_link_qca_libraries(${QCA_TOOL_NAME})
|
||||
|
||||
install(TARGETS ${QCA_TOOL_NAME} DESTINATION "${QCA_BINARY_INSTALL_DIR}")
|
||||
|
@ -26,6 +26,11 @@
|
||||
#include <QTextStream>
|
||||
#include <QTimer>
|
||||
|
||||
|
||||
#ifdef QT_STATICPLUGIN
|
||||
#include "import_plugins.h"
|
||||
#endif
|
||||
|
||||
const char *const APPNAME = "qcatool";
|
||||
const char *const EXENAME = "qcatool";
|
||||
const char *const VERSION = "2.0.3";
|
||||
|
@ -6,6 +6,6 @@ MY_AUTOMOC( base64unittest_bin_SRCS )
|
||||
|
||||
add_executable(base64unittest ${base64unittest_bin_SRCS} )
|
||||
|
||||
target_link_libraries( base64unittest ${QCA_LIB_NAME} ${QT_QTTEST_LIBRARY})
|
||||
target_link_qca_test_libraries(base64unittest)
|
||||
|
||||
ADD_TEST(Base64 ${EXECUTABLE_OUTPUT_PATH}/base64unittest)
|
||||
|
@ -28,6 +28,10 @@
|
||||
#include <QtCrypto>
|
||||
#include <QtTest/QtTest>
|
||||
|
||||
#ifdef QT_STATICPLUGIN
|
||||
#include "import_plugins.h"
|
||||
#endif
|
||||
|
||||
class Base64UnitTest : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
@ -6,6 +6,6 @@ MY_AUTOMOC( bigintunittest_bin_SRCS )
|
||||
|
||||
add_executable(bigintunittest ${bigintunittest_bin_SRCS} )
|
||||
|
||||
target_link_libraries( bigintunittest ${QCA_LIB_NAME} ${QT_QTTEST_LIBRARY})
|
||||
target_link_qca_test_libraries(bigintunittest)
|
||||
|
||||
ADD_TEST("BigInteger" ${EXECUTABLE_OUTPUT_PATH}/bigintunittest)
|
||||
|
@ -26,6 +26,10 @@
|
||||
#include <QtCrypto>
|
||||
#include <QtTest/QtTest>
|
||||
|
||||
#ifdef QT_STATICPLUGIN
|
||||
#include "import_plugins.h"
|
||||
#endif
|
||||
|
||||
class BigIntUnitTest : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
@ -6,7 +6,8 @@ MY_AUTOMOC( certunittest_bin_SRCS )
|
||||
|
||||
add_executable(certunittest ${certunittest_bin_SRCS} )
|
||||
|
||||
target_link_libraries( certunittest ${QCA_LIB_NAME} ${QT_QTTEST_LIBRARY})
|
||||
target_link_qca_test_libraries(certunittest)
|
||||
|
||||
|
||||
FOREACH( testFileName RootCAcert.pem 76.pem altname.pem csr1.pem
|
||||
GoodCACRL.pem ov-root-ca-cert.crt User.pem QcaTestClientCert.pem xmppcert.pem
|
||||
|
@ -26,6 +26,10 @@
|
||||
#include <QtCrypto>
|
||||
#include <QtTest/QtTest>
|
||||
|
||||
#ifdef QT_STATICPLUGIN
|
||||
#include "import_plugins.h"
|
||||
#endif
|
||||
|
||||
class CertUnitTest : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
@ -6,6 +6,6 @@ MY_AUTOMOC( cipherunittest_bin_SRCS )
|
||||
|
||||
add_executable(cipherunittest ${cipherunittest_bin_SRCS} )
|
||||
|
||||
target_link_libraries( cipherunittest ${QCA_LIB_NAME} ${QT_QTTEST_LIBRARY})
|
||||
target_link_qca_test_libraries(cipherunittest)
|
||||
|
||||
ADD_TEST( SymmetricCipher ${EXECUTABLE_OUTPUT_PATH}/cipherunittest)
|
||||
|
@ -26,6 +26,10 @@
|
||||
#include <QtCrypto>
|
||||
#include <QtTest/QtTest>
|
||||
|
||||
#ifdef QT_STATICPLUGIN
|
||||
#include "import_plugins.h"
|
||||
#endif
|
||||
|
||||
class CipherUnitTest : public QObject
|
||||
{
|
||||
|
||||
|
@ -6,6 +6,6 @@ MY_AUTOMOC( clientplugin_bin_SRCS )
|
||||
|
||||
add_executable(clientplugin ${clientplugin_bin_SRCS} )
|
||||
|
||||
target_link_libraries( clientplugin ${QCA_LIB_NAME} ${QT_QTTEST_LIBRARY})
|
||||
target_link_qca_test_libraries(clientplugin)
|
||||
|
||||
ADD_TEST(ClientSidePlugin ${EXECUTABLE_OUTPUT_PATH}/clientplugin)
|
||||
|
@ -26,6 +26,10 @@
|
||||
#include <QtCrypto>
|
||||
#include <QtTest/QtTest>
|
||||
|
||||
#ifdef QT_STATICPLUGIN
|
||||
#include "import_plugins.h"
|
||||
#endif
|
||||
|
||||
class ClientPlugin : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
@ -6,7 +6,7 @@ MY_AUTOMOC( cms_bin_SRCS )
|
||||
|
||||
add_executable(cms ${cms_bin_SRCS} )
|
||||
|
||||
target_link_libraries( cms ${QCA_LIB_NAME} ${QT_QTTEST_LIBRARY})
|
||||
target_link_qca_test_libraries(cms)
|
||||
|
||||
FOREACH( testFileName QcaTestRootCert.pem QcaTestClientCert.pem QcaTestClientKey.pem )
|
||||
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/${testFileName} ${CMAKE_CURRENT_BINARY_DIR}/${testFileName} COPYONLY)
|
||||
|
@ -26,6 +26,10 @@
|
||||
#include <QtCrypto>
|
||||
#include <QtTest/QtTest>
|
||||
|
||||
#ifdef QT_STATICPLUGIN
|
||||
#include "import_plugins.h"
|
||||
#endif
|
||||
|
||||
class CMSut : public QObject
|
||||
{
|
||||
|
||||
|
@ -6,7 +6,6 @@ MY_AUTOMOC( dsaunittest_bin_SRCS )
|
||||
|
||||
add_executable( dsaunittest ${dsaunittest_bin_SRCS} )
|
||||
|
||||
target_link_libraries( dsaunittest ${QCA_LIB_NAME} ${QT_QTTEST_LIBRARY})
|
||||
target_link_qca_test_libraries(dsaunittest)
|
||||
|
||||
ADD_TEST(DigitalSignatureAlgorithm ${EXECUTABLE_OUTPUT_PATH}/dsaunittest)
|
||||
|
||||
|
@ -26,6 +26,10 @@
|
||||
#include <QtCrypto>
|
||||
#include <QtTest/QtTest>
|
||||
|
||||
#ifdef QT_STATICPLUGIN
|
||||
#include "import_plugins.h"
|
||||
#endif
|
||||
|
||||
class DSAUnitTest : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
@ -6,7 +6,6 @@ MY_AUTOMOC( filewatchunittest_bin_SRCS )
|
||||
|
||||
add_executable( filewatchunittest ${filewatchunittest_bin_SRCS} )
|
||||
|
||||
target_link_libraries( filewatchunittest ${QCA_LIB_NAME} ${QT_QTTEST_LIBRARY})
|
||||
target_link_qca_test_libraries(filewatchunittest)
|
||||
|
||||
ADD_TEST(FileWatch ${EXECUTABLE_OUTPUT_PATH}/filewatchunittest)
|
||||
|
||||
|
@ -24,6 +24,10 @@
|
||||
*/
|
||||
#include "filewatchunittest.h"
|
||||
|
||||
#ifdef QT_STATICPLUGIN
|
||||
#include "import_plugins.h"
|
||||
#endif
|
||||
|
||||
void FileWatchUnitTest::initTestCase()
|
||||
{
|
||||
m_init = new QCA::Initializer;
|
||||
|
@ -6,7 +6,8 @@ MY_AUTOMOC( hashunittest_bin_SRCS )
|
||||
|
||||
add_executable( hashunittest ${hashunittest_bin_SRCS} )
|
||||
|
||||
target_link_libraries( hashunittest ${QCA_LIB_NAME} ${QT_QTTEST_LIBRARY})
|
||||
target_link_qca_test_libraries(hashunittest)
|
||||
|
||||
|
||||
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/data/empty ${CMAKE_CURRENT_BINARY_DIR}/data/empty COPYONLY)
|
||||
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/data/twobytes ${CMAKE_CURRENT_BINARY_DIR}/data/twobytes COPYONLY)
|
||||
|
@ -27,6 +27,10 @@
|
||||
#include <QtTest/QtTest>
|
||||
#include <QFile>
|
||||
|
||||
#ifdef QT_STATICPLUGIN
|
||||
#include "import_plugins.h"
|
||||
#endif
|
||||
|
||||
class HashUnitTest : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
@ -6,6 +6,6 @@ MY_AUTOMOC( hexunittest_bin_SRCS )
|
||||
|
||||
add_executable( hexunittest ${hexunittest_bin_SRCS} )
|
||||
|
||||
target_link_libraries( hexunittest ${QCA_LIB_NAME} ${QT_QTTEST_LIBRARY})
|
||||
target_link_qca_test_libraries(hexunittest)
|
||||
|
||||
ADD_TEST(HexadecimalConversion ${EXECUTABLE_OUTPUT_PATH}/hexunittest)
|
||||
|
@ -26,6 +26,10 @@
|
||||
#include <QtCrypto>
|
||||
#include <QtTest/QtTest>
|
||||
|
||||
#ifdef QT_STATICPLUGIN
|
||||
#include "import_plugins.h"
|
||||
#endif
|
||||
|
||||
class HexUnitTest : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
@ -6,6 +6,6 @@ MY_AUTOMOC( kdfunittest_bin_SRCS )
|
||||
|
||||
add_executable( kdfunittest ${kdfunittest_bin_SRCS} )
|
||||
|
||||
target_link_libraries( kdfunittest ${QCA_LIB_NAME} ${QT_QTTEST_LIBRARY})
|
||||
target_link_qca_test_libraries(kdfunittest)
|
||||
|
||||
ADD_TEST(KeyDerivationFunction ${EXECUTABLE_OUTPUT_PATH}/kdfunittest)
|
||||
|
@ -26,6 +26,10 @@
|
||||
#include <QtCrypto>
|
||||
#include <QtTest/QtTest>
|
||||
|
||||
#ifdef QT_STATICPLUGIN
|
||||
#include "import_plugins.h"
|
||||
#endif
|
||||
|
||||
class KDFUnitTest : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
@ -6,8 +6,7 @@ MY_AUTOMOC( keybundleunittest_bin_SRCS )
|
||||
|
||||
add_executable( keybundle ${keybundleunittest_bin_SRCS} )
|
||||
|
||||
target_link_libraries( keybundle ${QCA_LIB_NAME} ${QT_QTTEST_LIBRARY})
|
||||
|
||||
target_link_qca_test_libraries(keybundle)
|
||||
|
||||
FOREACH( testFileName RootCA2cert.pem servergood2.p12
|
||||
user2goodcert.pem user2goodkey.pem user2good.p12 )
|
||||
|
@ -26,6 +26,10 @@
|
||||
#include <QtCrypto>
|
||||
#include <QtTest/QtTest>
|
||||
|
||||
#ifdef QT_STATICPLUGIN
|
||||
#include "import_plugins.h"
|
||||
#endif
|
||||
|
||||
class KeyBundleTest : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
@ -6,6 +6,6 @@ MY_AUTOMOC( keygenunittest_bin_SRCS )
|
||||
|
||||
add_executable( keygenunittest ${keygenunittest_bin_SRCS} )
|
||||
|
||||
target_link_libraries( keygenunittest ${QCA_LIB_NAME} ${QT_QTTEST_LIBRARY})
|
||||
target_link_qca_test_libraries(keygenunittest)
|
||||
|
||||
ADD_TEST(KeyGeneration ${EXECUTABLE_OUTPUT_PATH}/keygenunittest)
|
||||
|
@ -26,6 +26,10 @@
|
||||
#include <QtCrypto>
|
||||
#include <QtTest/QtTest>
|
||||
|
||||
#ifdef QT_STATICPLUGIN
|
||||
#include "import_plugins.h"
|
||||
#endif
|
||||
|
||||
class KeyGenUnitTest : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
@ -6,6 +6,6 @@ MY_AUTOMOC( keylengthunittest_bin_SRCS )
|
||||
|
||||
add_executable( keylengthunittest ${keylengthunittest_bin_SRCS} )
|
||||
|
||||
target_link_libraries( keylengthunittest ${QCA_LIB_NAME} ${QT_QTTEST_LIBRARY})
|
||||
target_link_qca_test_libraries(keylengthunittest)
|
||||
|
||||
ADD_TEST(KeyLength ${EXECUTABLE_OUTPUT_PATH}/keylengthunittest)
|
||||
|
@ -28,6 +28,10 @@
|
||||
|
||||
#include <limits>
|
||||
|
||||
#ifdef QT_STATICPLUGIN
|
||||
#include "import_plugins.h"
|
||||
#endif
|
||||
|
||||
class KeyLengthUnitTest : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
@ -6,6 +6,6 @@ MY_AUTOMOC( keystoreunittest_bin_SRCS )
|
||||
|
||||
add_executable( keystore ${keystoreunittest_bin_SRCS} )
|
||||
|
||||
target_link_libraries( keystore ${QCA_LIB_NAME} ${QT_QTTEST_LIBRARY})
|
||||
target_link_qca_test_libraries(keystore)
|
||||
|
||||
ADD_TEST(KeyStore ${EXECUTABLE_OUTPUT_PATH}/keystore)
|
||||
|
@ -26,6 +26,10 @@
|
||||
#include <QtCrypto>
|
||||
#include <QtTest/QtTest>
|
||||
|
||||
#ifdef QT_STATICPLUGIN
|
||||
#include "import_plugins.h"
|
||||
#endif
|
||||
|
||||
class KeyStore : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
@ -6,6 +6,6 @@ MY_AUTOMOC( loggerunittest_bin_SRCS )
|
||||
|
||||
add_executable(loggerunittest ${loggerunittest_bin_SRCS} )
|
||||
|
||||
target_link_libraries( loggerunittest ${QCA_LIB_NAME} ${QT_QTTEST_LIBRARY})
|
||||
target_link_qca_test_libraries(loggerunittest)
|
||||
|
||||
ADD_TEST(Logger ${EXECUTABLE_OUTPUT_PATH}/loggerunittest)
|
||||
|
@ -26,6 +26,10 @@
|
||||
#include <QtCrypto>
|
||||
#include <QtTest/QtTest>
|
||||
|
||||
#ifdef QT_STATICPLUGIN
|
||||
#include "import_plugins.h"
|
||||
#endif
|
||||
|
||||
class LoggerUnitTest : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
@ -6,6 +6,6 @@ MY_AUTOMOC( macunittest_bin_SRCS )
|
||||
|
||||
add_executable( macunittest ${macunittest_bin_SRCS} )
|
||||
|
||||
target_link_libraries( macunittest ${QCA_LIB_NAME} ${QT_QTTEST_LIBRARY})
|
||||
target_link_qca_test_libraries(macunittest)
|
||||
|
||||
ADD_TEST(MessageAuthenticationCode ${EXECUTABLE_OUTPUT_PATH}/macunittest)
|
||||
|
@ -26,6 +26,10 @@
|
||||
#include <QtCrypto>
|
||||
#include <QtTest/QtTest>
|
||||
|
||||
#ifdef QT_STATICPLUGIN
|
||||
#include "import_plugins.h"
|
||||
#endif
|
||||
|
||||
class MACUnitTest : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
@ -6,6 +6,6 @@ MY_AUTOMOC( metatype_bin_SRCS )
|
||||
|
||||
add_executable( metatypeunittest ${metatype_bin_SRCS} )
|
||||
|
||||
target_link_libraries( metatypeunittest ${QCA_LIB_NAME} ${QT_QTTEST_LIBRARY})
|
||||
target_link_qca_test_libraries(metatypeunittest)
|
||||
|
||||
ADD_TEST(MetaTypeUnittest ${EXECUTABLE_OUTPUT_PATH}/metatypeunittest)
|
||||
|
@ -28,6 +28,10 @@
|
||||
|
||||
#include <limits>
|
||||
|
||||
#ifdef QT_STATICPLUGIN
|
||||
#include "import_plugins.h"
|
||||
#endif
|
||||
|
||||
class TestClass1 : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
@ -6,7 +6,8 @@ MY_AUTOMOC( pgpunittest_bin_SRCS )
|
||||
|
||||
add_executable(pgpunittest ${pgpunittest_bin_SRCS} )
|
||||
|
||||
target_link_libraries( pgpunittest ${QCA_LIB_NAME} ${QT_QTTEST_LIBRARY} )
|
||||
target_link_qca_test_libraries(pgpunittest)
|
||||
|
||||
|
||||
FOREACH( testFileName pubring.gpg secring.gpg trustdb.gpg )
|
||||
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/keys1/${testFileName} ${CMAKE_CURRENT_BINARY_DIR}/keys1/${testFileName} COPYONLY)
|
||||
|
@ -28,6 +28,10 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifdef QT_STATICPLUGIN
|
||||
#include "import_plugins.h"
|
||||
#endif
|
||||
|
||||
// qt did not introduce qputenv until 4.4, so we'll keep a copy here for 4.2
|
||||
// compat
|
||||
bool my_qputenv(const char *varName, const QByteArray& value)
|
||||
|
@ -6,6 +6,6 @@ MY_AUTOMOC( pipeunittest_bin_SRCS )
|
||||
|
||||
add_executable( pipeunittest ${pipeunittest_bin_SRCS} )
|
||||
|
||||
target_link_libraries( pipeunittest ${QCA_LIB_NAME} ${QT_QTTEST_LIBRARY})
|
||||
target_link_qca_test_libraries(pipeunittest)
|
||||
|
||||
# ADD_TEST(QPipe ${EXECUTABLE_OUTPUT_PATH}/pipeunittest)
|
||||
|
@ -26,6 +26,10 @@
|
||||
#include <QtCrypto>
|
||||
#include <QtTest/QtTest>
|
||||
|
||||
#ifdef QT_STATICPLUGIN
|
||||
#include "import_plugins.h"
|
||||
#endif
|
||||
|
||||
class PipeUnitTest : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
@ -6,7 +6,8 @@ MY_AUTOMOC( pkits_bin_SRCS )
|
||||
|
||||
add_executable(pkits ${pkits_bin_SRCS} )
|
||||
|
||||
target_link_libraries( pkits ${QCA_LIB_NAME} ${QT_QTTEST_LIBRARY})
|
||||
target_link_qca_test_libraries(pkits)
|
||||
|
||||
|
||||
FOREACH( testFileName BadnotAfterDateCACert.crt RFC3280MandatoryAttributeTypesCACRL.crl BadnotAfterDateCACRL.crl
|
||||
RFC3280OptionalAttributeTypesCACert.crt BadnotBeforeDateCACert.crt RFC3280OptionalAttributeTypesCACRL.crl
|
||||
|
@ -26,6 +26,10 @@
|
||||
#include <QtCrypto>
|
||||
#include <QtTest/QtTest>
|
||||
|
||||
#ifdef QT_STATICPLUGIN
|
||||
#include "import_plugins.h"
|
||||
#endif
|
||||
|
||||
class Pkits : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
@ -6,6 +6,6 @@ MY_AUTOMOC( rsaunittest_bin_SRCS )
|
||||
|
||||
add_executable(rsaunittest ${rsaunittest_bin_SRCS} )
|
||||
|
||||
target_link_libraries( rsaunittest ${QCA_LIB_NAME} ${QT_QTTEST_LIBRARY})
|
||||
target_link_qca_test_libraries(rsaunittest)
|
||||
|
||||
ADD_TEST(RSA ${EXECUTABLE_OUTPUT_PATH}/rsaunittest)
|
||||
|
@ -26,6 +26,10 @@
|
||||
#include <QtCrypto>
|
||||
#include <QtTest/QtTest>
|
||||
|
||||
#ifdef QT_STATICPLUGIN
|
||||
#include "import_plugins.h"
|
||||
#endif
|
||||
|
||||
class RSAUnitTest : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user