Page Menu
Home
GnuPG
Search
Configure Global Search
Log In
Files
F22947990
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Size
45 KB
Subscribers
None
View Options
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9909832ff..2e41f01d9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,246 +1,248 @@
# SPDX-FileCopyrightText: none
# SPDX-License-Identifier: BSD-3-Clause
cmake_minimum_required(VERSION 3.16 FATAL_ERROR)
set(RELEASE_SERVICE_VERSION_MAJOR "23")
set(RELEASE_SERVICE_VERSION_MINOR "03")
set(RELEASE_SERVICE_VERSION_MICRO "70")
# The RELEASE_SERVICE_VERSION is used by Gpg4win to add the Gpg4win version
if (NOT RELEASE_SERVICE_VERSION)
set(RELEASE_SERVICE_VERSION "${RELEASE_SERVICE_VERSION_MAJOR}.${RELEASE_SERVICE_VERSION_MINOR}.${RELEASE_SERVICE_VERSION_MICRO}")
endif()
if(RELEASE_SERVICE_VERSION_MICRO LESS 10)
set(KDE_APPLICATIONS_COMPACT_VERSION "${RELEASE_SERVICE_VERSION_MAJOR}${RELEASE_SERVICE_VERSION_MINOR}0${RELEASE_SERVICE_VERSION_MICRO}")
else()
set(KDE_APPLICATIONS_COMPACT_VERSION "${RELEASE_SERVICE_VERSION_MAJOR}${RELEASE_SERVICE_VERSION_MINOR}${RELEASE_SERVICE_VERSION_MICRO}")
endif()
set(KLEOPATRA_VERSION_MAJOR "3")
set(KLEOPATRA_VERSION_MINOR "1")
set(KLEOPATRA_VERSION_MICRO "26")
set(kleopatra_version "${KLEOPATRA_VERSION_MAJOR}.${KLEOPATRA_VERSION_MINOR}.${KLEOPATRA_VERSION_MICRO}.${KDE_APPLICATIONS_COMPACT_VERSION}")
# The following is for Windows
set(kleopatra_version_win "${KLEOPATRA_VERSION_MAJOR}.${KLEOPATRA_VERSION_MINOR}.${KLEOPATRA_VERSION_MICRO}")
set(kleopatra_fileversion_win "${KLEOPATRA_VERSION_MAJOR},${KLEOPATRA_VERSION_MINOR},${KLEOPATRA_VERSION_MICRO},0")
project(kleopatra VERSION ${kleopatra_version})
option(DISABLE_KWATCHGNUPG "Don't build the kwatchgnupg tool [default=OFF]" OFF)
# Standalone build. Find / include everything necessary.
set(KF5_MIN_VERSION "5.101.0")
set(KIDENTITYMANAGEMENT_VERSION "5.22.40")
set(KMAILTRANSPORT_VERSION "5.22.40")
set(KMIME_VERSION "5.22.40")
set(LIBKLEO_VERSION "5.22.44")
set(QT_REQUIRED_VERSION "5.15.2")
if (QT_MAJOR_VERSION STREQUAL "6")
set(QT_REQUIRED_VERSION "6.4.0")
endif()
set(GPGME_REQUIRED_VERSION "1.16.0")
+set(LIBASSUAN_REQUIRED_VERSION "2.4.2")
if (WIN32)
set(KF5_WANT_VERSION "5.70.0")
set(KMIME_WANT_VERSION "5.12.0")
else ()
set(KF5_WANT_VERSION ${KF5_MIN_VERSION})
set(KMIME_WANT_VERSION ${KMIME_VERSION})
endif ()
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
find_package(ECM ${KF5_WANT_VERSION} CONFIG REQUIRED)
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules ${CMAKE_MODULE_PATH})
include(ECMInstallIcons)
include(ECMSetupVersion)
include(ECMAddTests)
include(GenerateExportHeader)
include(ECMGenerateHeaders)
include(FeatureSummary)
include(CheckFunctionExists)
include(KDEInstallDirs)
include(KDECMakeSettings)
include(KDECompilerSettings NO_POLICY_SCOPE)
include(ECMAddAppIcon)
include(ECMQtDeclareLoggingCategory)
include(ECMDeprecationSettings)
include(KDEClangFormat)
# Find KF5 packages
find_package(KF5WidgetsAddons ${KF5_WANT_VERSION} CONFIG REQUIRED)
find_package(KF5ConfigWidgets ${KF5_WANT_VERSION} CONFIG REQUIRED)
find_package(KF5CoreAddons ${KF5_WANT_VERSION} CONFIG REQUIRED)
find_package(KF5Codecs ${KF5_WANT_VERSION} CONFIG REQUIRED)
find_package(KF5Config ${KF5_WANT_VERSION} CONFIG REQUIRED)
find_package(KF5I18n ${KF5_WANT_VERSION} CONFIG REQUIRED)
find_package(KF5IconThemes ${KF5_WANT_VERSION} CONFIG REQUIRED)
find_package(KF5ItemModels ${KF5_WANT_VERSION} CONFIG REQUIRED)
find_package(KF5XmlGui ${KF5_WANT_VERSION} CONFIG REQUIRED)
find_package(KF5WindowSystem ${KF5_WANT_VERSION} CONFIG REQUIRED)
find_package(KF5DocTools ${KF5_WANT_VERSION} CONFIG)
find_package(KF5Crash ${KF5_WANT_VERSION} REQUIRED)
set_package_properties(KF5DocTools PROPERTIES
DESCRIPTION "Documentation tools"
PURPOSE "Required to generate Kleopatra documentation."
TYPE OPTIONAL)
# Optional packages
if (WIN32)
# Only a replacement available for Windows so this
# is required on other platforms.
find_package(KF5DBusAddons ${KF5_WANT_VERSION} CONFIG)
set_package_properties(KF5DBusAddons PROPERTIES DESCRIPTION "Support library to work with DBus"
PURPOSE "DBus session integration"
URL "https://inqlude.org/libraries/kdbusaddons.html"
TYPE OPTIONAL)
else()
find_package(KF5DBusAddons ${KF5_WANT_VERSION} CONFIG REQUIRED)
set(_kleopatra_dbusaddons_libs KF5::DBusAddons)
endif()
set(HAVE_QDBUS ${Qt${QT_MAJOR_VERSION}DBus_FOUND})
find_package(Gpgmepp ${GPGME_REQUIRED_VERSION} CONFIG REQUIRED)
if (QT_MAJOR_VERSION STREQUAL "6")
find_package(QGpgmeQt6 ${GPGME_REQUIRED_VERSION} CONFIG REQUIRED)
else()
find_package(QGpgme ${GPGME_REQUIRED_VERSION} CONFIG REQUIRED)
endif()
if (QGpgme_VERSION VERSION_GREATER_EQUAL "1.17.0")
set(QGPGME_SUPPORTS_CHANGING_EXPIRATION_OF_COMPLETE_KEY 1)
set(QGPGME_CRYPTOCONFIGENTRY_HAS_DEFAULT_VALUE 1)
set(QGPGME_SUPPORTS_WKDLOOKUP 1)
set(QGPGME_SUPPORTS_IMPORT_WITH_FILTER 1)
set(QGPGME_SUPPORTS_IMPORT_WITH_KEY_ORIGIN 1)
set(QGPGME_SUPPORTS_SECRET_KEY_EXPORT 1)
set(QGPGME_SUPPORTS_SECRET_SUBKEY_EXPORT 1)
set(QGPGME_SUPPORTS_RECEIVING_KEYS_BY_KEY_ID 1)
endif()
if (QGpgme_VERSION VERSION_GREATER_EQUAL "1.18.0")
set(QGPGME_SUPPORTS_KEY_REVOCATION 1)
set(QGPGME_SUPPORTS_KEY_REFRESH 1)
set(QGPGME_SUPPORTS_SET_FILENAME 1)
set(QGPGME_SUPPORTS_SET_PRIMARY_UID 1)
endif()
if (Gpgmepp_VERSION VERSION_GREATER_EQUAL "1.18.1")
set(GPGMEPP_SUPPORTS_SET_CURVE 1)
endif()
# Kdepimlibs packages
find_package(KF5Libkleo ${LIBKLEO_VERSION} CONFIG REQUIRED)
find_package(KF5Mime ${KMIME_WANT_VERSION} CONFIG REQUIRED)
find_package(KF5IdentityManagement ${KIDENTITYMANAGEMENT_VERSION} CONFIG)
find_package(KF5MailTransport ${KMAILTRANSPORT_VERSION} CONFIG)
find_package(KF5MailTransportAkonadi ${KMAILTRANSPORT_VERSION} CONFIG)
find_package(Qt${QT_MAJOR_VERSION} ${QT_REQUIRED_VERSION} CONFIG REQUIRED Widgets Test Network PrintSupport)
-find_package(Assuan2 REQUIRED)
-
+find_package(LibAssuan ${LIBASSUAN_REQUIRED_VERSION} REQUIRED)
+set_package_properties(LibAssuan PROPERTIES
+ TYPE REQUIRED
+ PURPOSE "Needed for Kleopatra to act as the GnuPG UI Server"
+)
set(kleopatra_release FALSE)
if(NOT kleopatra_release)
find_package(Git)
if(GIT_FOUND)
execute_process(COMMAND ${GIT_EXECUTABLE} rev-parse
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
RESULT_VARIABLE rc
ERROR_QUIET)
if(rc EQUAL 0)
execute_process(COMMAND ${GIT_EXECUTABLE} log -1 --oneline --format=%h ${CMAKE_CURRENT_SOURCE_DIR}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
OUTPUT_VARIABLE Kleopatra_WC_REVISION)
string(REGEX REPLACE "\n" "" Kleopatra_WC_REVISION "${Kleopatra_WC_REVISION}")
execute_process(COMMAND ${GIT_EXECUTABLE} log -1 --oneline --format=%cI ${CMAKE_CURRENT_SOURCE_DIR}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
OUTPUT_VARIABLE Kleopatra_WC_LAST_CHANGED_DATE)
string(REGEX REPLACE "^([0-9]+)-([0-9]+)-([0-9]+)T([0-9]+):([0-9]+):([0-9]+).*$" "\\1\\2\\3T\\4\\5\\6"
Kleopatra_WC_LAST_CHANGED_DATE "${Kleopatra_WC_LAST_CHANGED_DATE}")
set(kleopatra_version "${kleopatra_version}+git${Kleopatra_WC_LAST_CHANGED_DATE}~${Kleopatra_WC_REVISION}")
endif()
endif()
endif()
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/version-kleopatra.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/version-kleopatra.h)
-
-include (ConfigureChecks.cmake)
-
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config-kleopatra.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-kleopatra.h)
+
include_directories(
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}
- ${ASSUAN2_INCLUDES}
- )
+ ${LibAssuan_INCLUDE_DIRS}
+)
if (WIN32)
# On Windows, we need to use stuff deprecated since Qt 5.11, e.g. from QDesktopWidget
ecm_set_disabled_deprecation_versions(QT 5.10.0 KF 5.101.0)
else ()
ecm_set_disabled_deprecation_versions(QT 5.15.0 KF 5.101.0)
endif ()
if(CMAKE_COMPILER_IS_GNUCXX)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-missing-braces -Wno-parentheses -Wno-ignored-qualifiers")
endif()
if(MINGW)
# we do not care about different signedness of passed pointer arguments
add_compile_options($<$<COMPILE_LANGUAGE:C>:-Wno-pointer-sign>)
endif()
add_definitions(-DQT_NO_EMIT)
remove_definitions(-DQT_NO_FOREACH)
# Disable the use of QStringBuilder for operator+ to prevent crashes when
# returning the result of concatenating string temporaries in lambdas. We do
# this for example in some std::transform expressions.
# This is a known issue: https://bugreports.qt.io/browse/QTBUG-47066
# Alternatively, one would always have to remember to force the lambdas to
# return a QString instead of QStringBuilder, but that's just too easy to
# forget and, unfortunately, the compiler doesn't issue a warning if one forgets
# this. So, it's just too dangerous.
# One can still use QStringBuilder explicitly with the operator% if necessary.
remove_definitions(-DQT_USE_FAST_OPERATOR_PLUS)
remove_definitions(-DQT_USE_QSTRINGBUILDER)
kde_enable_exceptions()
option(USE_UNITY_CMAKE_SUPPORT "Use UNITY cmake support (speedup compile time)" OFF)
set(COMPILE_WITH_UNITY_CMAKE_SUPPORT OFF)
if (USE_UNITY_CMAKE_SUPPORT)
set(COMPILE_WITH_UNITY_CMAKE_SUPPORT ON)
endif()
add_subdirectory(pics)
add_subdirectory(src)
if(BUILD_TESTING)
add_subdirectory(tests)
add_subdirectory(autotests)
endif()
ecm_qt_install_logging_categories(
EXPORT KLEOPATRA
FILE kleopatra.categories
DESTINATION ${KDE_INSTALL_LOGGINGCATEGORIESDIR}
)
ki18n_install(po)
if(KF5DocTools_FOUND)
kdoctools_install(po)
add_subdirectory(doc)
endif()
feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
# add clang-format target for all our real source files
file(GLOB_RECURSE ALL_CLANG_FORMAT_SOURCE_FILES *.cpp *.h *.c)
kde_clang_format(${ALL_CLANG_FORMAT_SOURCE_FILES})
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake
deleted file mode 100644
index b1625e375..000000000
--- a/ConfigureChecks.cmake
+++ /dev/null
@@ -1,10 +0,0 @@
-# assuan configure checks
-include(CheckFunctionExists)
-
-if ( ASSUAN2_FOUND )
-else ( ASSUAN2_FOUND )
- # TODO Clean this up with assuan 2 as hard dependency.
- message(FATAL_ERROR "At least version 2 of libassuan is required for Kleopatra.")
-endif ( ASSUAN2_FOUND )
-
- message( STATUS "Usable assuan found for Kleopatra" )
diff --git a/cmake/modules/FindAssuan2.cmake b/cmake/modules/FindAssuan2.cmake
deleted file mode 100644
index 2a46fbe19..000000000
--- a/cmake/modules/FindAssuan2.cmake
+++ /dev/null
@@ -1,239 +0,0 @@
-# - Try :to find the assuan v2 library
-
-# Variables set:
-# ASSUAN2_{INCLUDES,FOUND,LIBRARIES} will be set for each of the above
-
-#if this is built-in, please replace, if it isn't, export into a MacroToBool.cmake of it's own
-macro( macro_bool_to_bool FOUND_VAR )
- foreach( _current_VAR ${ARGN} )
- if ( ${FOUND_VAR} )
- set( ${_current_VAR} TRUE )
- else()
- set( ${_current_VAR} FALSE )
- endif()
- endforeach()
-endmacro()
-
-if ( WIN32 )
-
- # On Windows, we don't have a libassuan-config script, so we need to
- # look for the stuff ourselves:
-
- # in cmake, AND and OR have the same precedence, there's no
- # subexpressions, and expressions are evaluated short-circuit'ed
- # IOW: CMake if() suxx.
- set( _seem_to_have_cached_assuan2 false )
- if ( ASSUAN2_INCLUDES )
- if ( ASSUAN2_VANILLA_LIBRARIES )#OR ASSUAN2_QT_LIBRARIES OR ASSUAN2_GLIB_LIBRARIES )
- set( _seem_to_have_cached_assuan2 true )
- endif()
- endif()
-
- if ( _seem_to_have_cached_assuan2 )
-
- macro_bool_to_bool( ASSUAN2_VANILLA_LIBRARIES ASSUAN2_VANILLA_FOUND )
- # this would have been preferred:
- #set( ASSUAN2_*_FOUND macro_bool_to_bool(ASSUAN2_*_LIBRARIES) )
-
- if ( ASSUAN2_VANILLA_FOUND ) #OR ASSUAN2_GLIB_FOUND OR ASSUAN2_QT_FOUND )
- set( ASSUAN2_FOUND true )
- else()
- set( ASSUAN2_FOUND false )
- endif()
-
- else()
-
- set( ASSUAN2_FOUND false )
- set( ASSUAN2_VANILLA_FOUND false )
- #set( ASSUAN2_GLIB_FOUND false )
- #set( ASSUAN2_QT_FOUND false )
-
- find_path( ASSUAN2_INCLUDES assuan.h
- ${CMAKE_INCLUDE_PATH}
- ${CMAKE_INSTALL_PREFIX}/include
- )
-
- find_library( _assuan2_library NAMES assuan2 libassuan2 assuan libassuan assuan-0 libassuan-0 #sic!
- PATHS
- ${CMAKE_LIBRARY_PATH}
- ${CMAKE_INSTALL_PREFIX}/lib
- )
-
- find_library( _gpg_error_library NAMES gpg-error libgpg-error gpg-error-0 libgpg-error-0
- PATHS
- ${CMAKE_LIBRARY_PATH}
- ${CMAKE_INSTALL_PREFIX}/lib
- )
-
- set( ASSUAN2_INCLUDES ${ASSUAN2_INCLUDES} )
-
- if ( _assuan2_library AND _gpg_error_library )
- set( ASSUAN2_LIBRARIES ${_assuan2_library} ${_gpg_error_library} ws2_32 )
- set( ASSUAN2_FOUND true )
- endif()
-
- endif()
-
-else() # not WIN32
-
- # On *nix, we have the libassuan-config script which can tell us all we
- # need to know:
-
- # see WIN32 case for an explanation of what this does:
- set( _seem_to_have_cached_assuan2 false )
- if ( ASSUAN2_INCLUDES AND ASSUAN2_LIBRARIES )
- set( _seem_to_have_cached_assuan2 true )
- endif()
-
- if ( _seem_to_have_cached_assuan2 )
-
- set( ASSUAN2_FOUND true )
-
- else()
-
- set( ASSUAN2_FOUND false )
-
- find_program( _ASSUAN2CONFIG_EXECUTABLE NAMES libassuan-config )
-
- # if libassuan-config has been found
- if ( _ASSUAN2CONFIG_EXECUTABLE )
-
- message( STATUS "Found libassuan-config at ${_ASSUAN2CONFIG_EXECUTABLE}" )
-
- exec_program( ${_ASSUAN2CONFIG_EXECUTABLE} ARGS --version OUTPUT_VARIABLE ASSUAN2_VERSION )
-
- set( _ASSUAN2_MIN_VERSION "2.0.0" )
- if( ASSUAN2_VERSION VERSION_GREATER ${_ASSUAN2_MIN_VERSION} )
- set( _ASSUAN2_INSTALLED_VERSION_OK TRUE )
- endif()
-
- if ( NOT _ASSUAN2_INSTALLED_VERSION_OK )
-
- message( STATUS "The installed version of assuan is too old: ${ASSUAN2_VERSION} (required: >= ${_ASSUAN2_MIN_VERSION})" )
-
- else()
-
- message( STATUS "Found assuan v${ASSUAN2_VERSION}" )
-
- exec_program( ${_ASSUAN2CONFIG_EXECUTABLE} ARGS --libs OUTPUT_VARIABLE _assuan2_config_libs RETURN_VALUE _ret )
- if ( _ret )
- set( _assuan2_config_libs )
- endif()
-
- # append -lgpg-error to the list of libraries, if necessary
- if ( _assuan2_config_libs AND NOT _assuan2_config_libs MATCHES "lgpg-error" )
- set( _assuan2_config_libs "${_assuan2_config_libs} -lgpg-error" )
- endif()
-
- if ( _assuan2_config_libs )
-
- exec_program( ${_ASSUAN2CONFIG_EXECUTABLE} ARGS --cflags OUTPUT_VARIABLE _ASSUAN2_CFLAGS )
-
- if ( _ASSUAN2_CFLAGS )
- string( REGEX REPLACE "(\r?\n)+$" " " _ASSUAN2_CFLAGS "${_ASSUAN2_CFLAGS}" )
- string( REGEX REPLACE " *-I" ";" ASSUAN2_INCLUDES "${_ASSUAN2_CFLAGS}" )
- endif()
-
- if ( _assuan2_config_libs )
-
- set( _assuan2_library_dirs )
- set( _assuan2_library_names )
-
- string( REGEX REPLACE " +" ";" _assuan2_config_libs "${_assuan2_config_libs}" )
-
- foreach( _flag ${_assuan2_config_libs} )
- if ( "${_flag}" MATCHES "^-L" )
- string( REGEX REPLACE "^-L" "" _dir "${_flag}" )
- file( TO_CMAKE_PATH "${_dir}" _dir )
- set( _assuan2_library_dirs ${_assuan2_library_dirs} "${_dir}" )
- elseif( "${_flag}" MATCHES "^-l" )
- string( REGEX REPLACE "^-l" "" _name "${_flag}" )
- set( _assuan2_library_names ${_assuan2_library_names} "${_name}" )
- endif()
- endforeach()
-
- set( ASSUAN2_FOUND true )
-
- foreach( _name ${_assuan2_library_names} )
- set( _assuan2_${_name}_lib )
-
- # if -L options were given, look only there
- if ( _assuan2_library_dirs )
- find_library( _assuan2_${_name}_lib NAMES ${_name} PATHS ${_assuan2_library_dirs} NO_DEFAULT_PATH )
- endif()
-
- # if not found there, look in system directories
- if ( NOT _assuan2_${_name}_lib )
- find_library( _assuan2_${_name}_lib NAMES ${_name} )
- endif()
-
- # if still not found, then the whole flavour isn't found
- if ( NOT _assuan2_${_name}_lib )
- if ( ASSUAN2_FOUND )
- set( ASSUAN2_FOUND false )
- set( _not_found_reason "dependent library ${_name} wasn't found" )
- endif()
- endif()
-
- set( ASSUAN2_LIBRARIES ${ASSUAN2_LIBRARIES} "${_assuan2_${_name}_lib}" )
- endforeach()
-
- #check_c_library_exists_explicit( assuan assuan_check_version "${_ASSUAN2_CFLAGS}" "${ASSUAN2_LIBRARIES}" ASSUAN2_FOUND )
- if ( ASSUAN2_FOUND )
- message( STATUS " Checking whether assuan is usable...yes" )
- else()
- message( STATUS " Checking whether assuan is usable...no" )
- message( STATUS " (${_not_found_reason})" )
- endif()
- endif()
-
- # ensure that they are cached
- set( ASSUAN2_INCLUDES ${ASSUAN2_INCLUDES} )
- set( ASSUAN2_LIBRARIES ${ASSUAN2_LIBRARIES} )
-
- endif()
-
- endif()
-
- endif()
-
- endif()
-
-endif() # WIN32 | Unix
-
-
-if ( NOT Assuan2_FIND_QUIETLY )
-
- if ( ASSUAN2_FOUND )
- message( STATUS "Usable assuan found." )
- message( STATUS " Includes: ${ASSUAN2_INCLUDES}" )
- message( STATUS " Libraries: ${ASSUAN2_LIBRARIES}" )
- else()
- message( STATUS "No usable assuan found." )
- endif()
-
- if( Assuan2_FIND_REQUIRED )
- set( _ASSUAN2_TYPE "REQUIRED" )
- else()
- set( _ASSUAN2_TYPE "OPTIONAL" )
- endif()
-
- if ( WIN32 )
- set( _assuan2_homepage "https://www.gpg4win.org" )
- else()
- set( _assuan2_homepage "https://www.gnupg.org/related_software/libassuan" )
- endif()
-
- set_package_properties(ASSUAN2 PROPERTIES DESCRIPTION "Assuan v2 IPC library"
- URL ${_assuan2_homepage}
- TYPE ${_ASSUAN2_TYPE}
- PURPOSE "Needed for Kleopatra to act as the GnuPG UI Server"
- )
-
-else()
-
- if ( Assuan2_FIND_REQUIRED AND NOT ASSUAN2_FOUND )
- message( FATAL_ERROR "Assuan2 is required but was not found." )
- endif()
-
-endif()
diff --git a/cmake/modules/FindLibAssuan.cmake b/cmake/modules/FindLibAssuan.cmake
new file mode 100644
index 000000000..109b66251
--- /dev/null
+++ b/cmake/modules/FindLibAssuan.cmake
@@ -0,0 +1,100 @@
+# SPDX-FileCopyrightText: 2022 g10 Code GmbH
+# SPDX-FileContributor: Ingo Klöcker <dev@ingo-kloecker.de>
+#
+# SPDX-License-Identifier: BSD-3-Clause
+
+#[=======================================================================[.rst:
+FindLibAssuan
+-------------
+
+Finds the Libassuan library.
+
+Result Variables
+^^^^^^^^^^^^^^^^
+
+This will define the following variables:
+
+``LibAssuan_FOUND``
+ True if the system has the Libassuan library.
+``LibAssuan_VERSION``
+ The version of the Libassuan library which was found.
+``LibAssuan_INCLUDE_DIRS``
+ Include directories needed to use Libassuan.
+``LibAssuan_LIBRARIES``
+ Libraries needed to link to Libassuan.
+``LibAssuan_DEFINITIONS``
+ The compile definitions to use when compiling code that uses Libassuan.
+
+Cache Variables
+^^^^^^^^^^^^^^^
+
+The following cache variables may also be set:
+
+``LibAssuan_INCLUDE_DIR``
+ The directory containing ``assuan.h``.
+``LibAssuan_LIBRARY``
+ The path to the Libassuan library.
+
+#]=======================================================================]
+
+find_package(PkgConfig QUIET)
+pkg_check_modules(PC_LibAssuan QUIET libassuan)
+
+set(LibAssuan_VERSION ${PC_LibAssuan_VERSION})
+set(LibAssuan_DEFINITIONS ${PC_LibAssuan_CFLAGS_OTHER})
+
+find_path(LibAssuan_INCLUDE_DIR
+ NAMES
+ assuan.h
+ PATHS
+ ${PC_LibAssuan_INCLUDE_DIRS}
+)
+find_library(LibAssuan_LIBRARY
+ NAMES
+ assuan
+ PATHS
+ ${PC_LibAssuan_LIBRARY_DIRS}
+)
+
+if(WIN32)
+ set(_LibAssuan_ADDITIONAL_LIBRARIES ws2_32)
+endif()
+
+if(LibAssuan_INCLUDE_DIR AND NOT LibAssuan_VERSION)
+ # The version is given in the format MAJOR.MINOR.PATCH optionally followed
+ # by an intermediate "beta" version given as -betaNUM, e.g. "2.5.6-beta38".
+ file(STRINGS "${LibAssuan_INCLUDE_DIR}/assuan.h" LibAssuan_VERSION_STR
+ REGEX "^#[\t ]*define[\t ]+ASSUAN_VERSION[\t ]+\"([0-9])+\\.([0-9])+\\.([0-9])+(-[a-z0-9]*)?\".*")
+ string(REGEX REPLACE "^.*ASSUAN_VERSION[\t ]+\"([0-9]+\\.[0-9]+\\.[0-9]+(-[a-z0-9]*)?)\".*$"
+ "\\1" LibAssuan_VERSION_STR "${LibAssuan_VERSION_STR}")
+
+ set(LibAssuan_VERSION "${LibAssuan_VERSION_STR}")
+
+ unset(LibAssuan_VERSION_STR)
+endif()
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(LibAssuan
+ REQUIRED_VARS
+ LibAssuan_LIBRARY
+ LibAssuan_INCLUDE_DIR
+ LibAssuan_VERSION
+ VERSION_VAR
+ LibAssuan_VERSION
+)
+
+mark_as_advanced(
+ LibAssuan_INCLUDE_DIR
+ LibAssuan_LIBRARY
+)
+
+if(LibAssuan_FOUND)
+ set(LibAssuan_LIBRARIES ${LibAssuan_LIBRARY} ${_LibAssuan_ADDITIONAL_LIBRARIES})
+ set(LibAssuan_INCLUDE_DIRS ${LibAssuan_INCLUDE_DIR})
+endif()
+
+include(FeatureSummary)
+set_package_properties(LibAssuan PROPERTIES
+ DESCRIPTION "IPC library for the GnuPG components"
+ URL https://www.gnupg.org/software/libassuan
+)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 2cb83ad3d..8a1a6ff5d 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1,612 +1,612 @@
# SPDX-FileCopyrightText: none
# SPDX-License-Identifier: BSD-3-Clause
add_subdirectory(icons)
add_subdirectory(mimetypes)
include_directories(${CMAKE_CURRENT_BINARY_DIR})
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
if (NOT DISABLE_KWATCHGNUPG)
add_subdirectory(kwatchgnupg)
endif()
add_subdirectory(libkleopatraclient)
add_subdirectory(conf)
add_subdirectory(kconf_update)
if(WIN32)
set(_kleopatra_extra_uiserver_SRCS uiserver/uiserver_win.cpp)
set(_kleopatra_extra_SRCS
selftest/registrycheck.cpp
utils/gnupg-registry.c
utils/userinfo_win.cpp
utils/windowsprocessdevice.cpp
)
else()
set(_kleopatra_extra_uiserver_SRCS uiserver/uiserver_unix.cpp)
set(_kleopatra_extra_SRCS)
endif()
set(_kleopatra_uiserver_SRCS
${_kleopatra_extra_uiserver_SRCS}
selftest/uiservercheck.cpp
uiserver/assuanserverconnection.cpp
uiserver/createchecksumscommand.cpp
uiserver/decryptverifycommandemailbase.cpp
uiserver/decryptverifycommandfilesbase.cpp
uiserver/echocommand.cpp
uiserver/encryptcommand.cpp
uiserver/importfilescommand.cpp
uiserver/prepencryptcommand.cpp
uiserver/prepsigncommand.cpp
uiserver/selectcertificatecommand.cpp
uiserver/sessiondata.cpp
uiserver/signcommand.cpp
uiserver/signencryptfilescommand.cpp
uiserver/uiserver.cpp
uiserver/verifychecksumscommand.cpp
)
- include_directories(${ASSUAN2_INCLUDES})
- set(_kleopatra_uiserver_extra_libs ${ASSUAN2_LIBRARIES})
+include_directories(${LibAssuan_INCLUDE_DIRS})
+set(_kleopatra_uiserver_extra_libs ${LibAssuan_LIBRARIES})
if(HAVE_GPG_ERR_SOURCE_KLEO)
add_definitions(-DGPG_ERR_SOURCE_DEFAULT=GPG_ERR_SOURCE_KLEO)
add_definitions(-DGPGMEPP_ERR_SOURCE_DEFAULT=GPG_ERR_SOURCE_KLEO)
else()
add_definitions(-DGPG_ERR_SOURCE_DEFAULT=GPG_ERR_SOURCE_USER_1)
add_definitions(-DGPGMEPP_ERR_SOURCE_DEFAULT=GPG_ERR_SOURCE_USER_1)
endif()
if(KF5IdentityManagement_FOUND AND KF5MailTransport_FOUND AND KF5MailTransportAkonadi_FOUND)
set(_kleopatra_mail_libs
KF5::IdentityManagement # Export OpenPGP keys using WKS
KF5::MailTransport
KF5::MailTransportAkonadi
)
add_definitions(-DMAILAKONADI_ENABLED)
endif()
ki18n_wrap_ui(_kleopatra_uiserver_SRCS crypto/gui/signingcertificateselectionwidget.ui)
set(_kleopatra_SRCS
${_kleopatra_extra_SRCS}
accessibility/accessiblelink.cpp
accessibility/accessiblelink_p.h
accessibility/accessiblerichtextlabel.cpp
accessibility/accessiblerichtextlabel_p.h
accessibility/accessiblevaluelabel.cpp
accessibility/accessiblevaluelabel_p.h
accessibility/accessiblewidgetfactory.cpp
accessibility/accessiblewidgetfactory.h
commands/adduseridcommand.cpp
commands/adduseridcommand.h
commands/authenticatepivcardapplicationcommand.cpp
commands/authenticatepivcardapplicationcommand.h
commands/cardcommand.cpp
commands/cardcommand.h
commands/certificatetopivcardcommand.cpp
commands/certificatetopivcardcommand.h
commands/certifycertificatecommand.cpp
commands/certifycertificatecommand.h
commands/changeexpirycommand.cpp
commands/changeexpirycommand.h
commands/changeownertrustcommand.cpp
commands/changeownertrustcommand.h
commands/changepassphrasecommand.cpp
commands/changepassphrasecommand.h
commands/changepincommand.cpp
commands/changepincommand.h
commands/changeroottrustcommand.cpp
commands/changeroottrustcommand.h
commands/checksumcreatefilescommand.cpp
commands/checksumcreatefilescommand.h
commands/checksumverifyfilescommand.cpp
commands/checksumverifyfilescommand.h
commands/clearcrlcachecommand.cpp
commands/clearcrlcachecommand.h
commands/command.cpp
commands/command.h
commands/createcsrforcardkeycommand.cpp
commands/createcsrforcardkeycommand.h
commands/createopenpgpkeyfromcardkeyscommand.cpp
commands/createopenpgpkeyfromcardkeyscommand.h
commands/decryptverifyclipboardcommand.cpp
commands/decryptverifyclipboardcommand.h
commands/decryptverifyfilescommand.cpp
commands/decryptverifyfilescommand.h
commands/deletecertificatescommand.cpp
commands/deletecertificatescommand.h
commands/detailscommand.cpp
commands/detailscommand.h
commands/dumpcertificatecommand.cpp
commands/dumpcertificatecommand.h
commands/dumpcrlcachecommand.cpp
commands/dumpcrlcachecommand.h
commands/encryptclipboardcommand.cpp
commands/encryptclipboardcommand.h
commands/exportcertificatecommand.cpp
commands/exportcertificatecommand.h
commands/exportgroupscommand.cpp
commands/exportgroupscommand.h
commands/exportopenpgpcertstoservercommand.cpp
commands/exportopenpgpcertstoservercommand.h
commands/exportopenpgpcerttoprovidercommand.cpp
commands/exportopenpgpcerttoprovidercommand.h
commands/exportpaperkeycommand.cpp
commands/exportpaperkeycommand.h
commands/exportsecretkeycommand.cpp
commands/exportsecretkeycommand.h
commands/exportsecretkeycommand_old.cpp
commands/exportsecretkeycommand_old.h
commands/exportsecretsubkeycommand.cpp
commands/exportsecretsubkeycommand.h
commands/genrevokecommand.cpp
commands/genrevokecommand.h
commands/gnupgprocesscommand.cpp
commands/gnupgprocesscommand.h
commands/importcertificatefromclipboardcommand.cpp
commands/importcertificatefromclipboardcommand.h
commands/importcertificatefromdatacommand.cpp
commands/importcertificatefromdatacommand.h
commands/importcertificatefromfilecommand.cpp
commands/importcertificatefromfilecommand.h
commands/importcertificatefromkeyservercommand.cpp
commands/importcertificatefromkeyservercommand.h
commands/importcertificatefrompivcardcommand.cpp
commands/importcertificatefrompivcardcommand.h
commands/importcertificatescommand.cpp
commands/importcertificatescommand.h
commands/importcrlcommand.cpp
commands/importcrlcommand.h
commands/importpaperkeycommand.cpp
commands/importpaperkeycommand.h
commands/keytocardcommand.cpp
commands/keytocardcommand.h
commands/learncardkeyscommand.cpp
commands/learncardkeyscommand.h
commands/lookupcertificatescommand.cpp
commands/lookupcertificatescommand.h
commands/newcertificatesigningrequestcommand.cpp
commands/newcertificatesigningrequestcommand.h
commands/newopenpgpcertificatecommand.cpp
commands/newopenpgpcertificatecommand.h
commands/openpgpgeneratecardkeycommand.cpp
commands/openpgpgeneratecardkeycommand.h
commands/pivgeneratecardkeycommand.cpp
commands/pivgeneratecardkeycommand.h
commands/refreshcertificatecommand.cpp
commands/refreshcertificatecommand.h
commands/refreshopenpgpcertscommand.cpp
commands/refreshopenpgpcertscommand.h
commands/refreshx509certscommand.cpp
commands/refreshx509certscommand.h
commands/reloadkeyscommand.cpp
commands/reloadkeyscommand.h
commands/revokecertificationcommand.cpp
commands/revokecertificationcommand.h
commands/revokekeycommand.cpp
commands/revokekeycommand.h
commands/revokeuseridcommand.cpp
commands/revokeuseridcommand.h
commands/selftestcommand.cpp
commands/selftestcommand.h
commands/setinitialpincommand.cpp
commands/setinitialpincommand.h
commands/setpivcardapplicationadministrationkeycommand.cpp
commands/setpivcardapplicationadministrationkeycommand.h
commands/setprimaryuseridcommand.cpp
commands/setprimaryuseridcommand.h
commands/signclipboardcommand.cpp
commands/signclipboardcommand.h
commands/signencryptfilescommand.cpp
commands/signencryptfilescommand.h
commands/signencryptfoldercommand.cpp
commands/signencryptfoldercommand.h
conf/configuredialog.cpp
conf/configuredialog.h
conf/groupsconfigdialog.cpp
conf/groupsconfigdialog.h
conf/groupsconfigpage.cpp
conf/groupsconfigpage.h
conf/groupsconfigwidget.cpp
conf/groupsconfigwidget.h
crypto/autodecryptverifyfilescontroller.cpp
crypto/autodecryptverifyfilescontroller.h
crypto/certificateresolver.cpp
crypto/certificateresolver.h
crypto/checksumsutils_p.cpp
crypto/checksumsutils_p.h
crypto/controller.cpp
crypto/controller.h
crypto/createchecksumscontroller.cpp
crypto/createchecksumscontroller.h
crypto/decryptverifyemailcontroller.cpp
crypto/decryptverifyemailcontroller.h
crypto/decryptverifyfilescontroller.cpp
crypto/decryptverifyfilescontroller.h
crypto/decryptverifytask.cpp
crypto/decryptverifytask.h
crypto/encryptemailcontroller.cpp
crypto/encryptemailcontroller.h
crypto/encryptemailtask.cpp
crypto/encryptemailtask.h
crypto/gui/certificatelineedit.cpp
crypto/gui/certificatelineedit.h
crypto/gui/certificateselectionline.cpp
crypto/gui/certificateselectionline.h
crypto/gui/decryptverifyfilesdialog.cpp
crypto/gui/decryptverifyfilesdialog.h
crypto/gui/decryptverifyfileswizard.cpp
crypto/gui/decryptverifyfileswizard.h
crypto/gui/decryptverifyoperationwidget.cpp
crypto/gui/decryptverifyoperationwidget.h
crypto/gui/encryptemailwizard.cpp
crypto/gui/encryptemailwizard.h
crypto/gui/newresultpage.cpp
crypto/gui/newresultpage.h
crypto/gui/objectspage.cpp
crypto/gui/objectspage.h
crypto/gui/resolverecipientspage.cpp
crypto/gui/resolverecipientspage.h
crypto/gui/resultitemwidget.cpp
crypto/gui/resultitemwidget.h
crypto/gui/resultlistwidget.cpp
crypto/gui/resultlistwidget.h
crypto/gui/resultpage.cpp
crypto/gui/resultpage.h
crypto/gui/signemailwizard.cpp
crypto/gui/signemailwizard.h
crypto/gui/signencryptemailconflictdialog.cpp
crypto/gui/signencryptemailconflictdialog.h
crypto/gui/signencryptfileswizard.cpp
crypto/gui/signencryptfileswizard.h
crypto/gui/signencryptwidget.cpp
crypto/gui/signencryptwidget.h
crypto/gui/signencryptwizard.cpp
crypto/gui/signencryptwizard.h
crypto/gui/signerresolvepage.cpp
crypto/gui/signerresolvepage.h
crypto/gui/signingcertificateselectiondialog.cpp
crypto/gui/signingcertificateselectiondialog.h
crypto/gui/signingcertificateselectionwidget.cpp
crypto/gui/signingcertificateselectionwidget.h
crypto/gui/unknownrecipientwidget.cpp
crypto/gui/unknownrecipientwidget.h
crypto/gui/verifychecksumsdialog.cpp
crypto/gui/verifychecksumsdialog.h
crypto/gui/wizard.cpp
crypto/gui/wizard.h
crypto/gui/wizardpage.cpp
crypto/gui/wizardpage.h
crypto/newsignencryptemailcontroller.cpp
crypto/newsignencryptemailcontroller.h
crypto/recipient.cpp
crypto/recipient.h
crypto/sender.cpp
crypto/sender.h
crypto/signemailcontroller.cpp
crypto/signemailcontroller.h
crypto/signemailtask.cpp
crypto/signemailtask.h
crypto/signencryptfilescontroller.cpp
crypto/signencryptfilescontroller.h
crypto/signencrypttask.cpp
crypto/signencrypttask.h
crypto/task.cpp
crypto/task.h
crypto/taskcollection.cpp
crypto/taskcollection.h
crypto/verifychecksumscontroller.cpp
crypto/verifychecksumscontroller.h
dialogs/adduseriddialog.cpp
dialogs/adduseriddialog.h
dialogs/certificatedetailsdialog.cpp
dialogs/certificatedetailsdialog.h
dialogs/certificatedetailsinputwidget.cpp
dialogs/certificatedetailsinputwidget.h
dialogs/certificatedetailswidget.cpp
dialogs/certificatedetailswidget.h
dialogs/certificateselectiondialog.cpp
dialogs/certificateselectiondialog.h
dialogs/certifycertificatedialog.cpp
dialogs/certifycertificatedialog.h
dialogs/certifywidget.cpp
dialogs/certifywidget.h
dialogs/createcsrforcardkeydialog.cpp
dialogs/createcsrforcardkeydialog.h
dialogs/deletecertificatesdialog.cpp
dialogs/deletecertificatesdialog.h
dialogs/editgroupdialog.cpp
dialogs/editgroupdialog.h
dialogs/expirydialog.cpp
dialogs/expirydialog.h
dialogs/exportdialog.cpp
dialogs/exportdialog.h
dialogs/gencardkeydialog.cpp
dialogs/gencardkeydialog.h
dialogs/groupdetailsdialog.cpp
dialogs/groupdetailsdialog.h
dialogs/lookupcertificatesdialog.cpp
dialogs/lookupcertificatesdialog.h
dialogs/nameandemailwidget.cpp
dialogs/nameandemailwidget.h
dialogs/newopenpgpcertificatedetailsdialog.cpp
dialogs/newopenpgpcertificatedetailsdialog.h
dialogs/pivcardapplicationadministrationkeyinputdialog.cpp
dialogs/pivcardapplicationadministrationkeyinputdialog.h
dialogs/revokekeydialog.cpp
dialogs/revokekeydialog.h
dialogs/selftestdialog.cpp
dialogs/selftestdialog.h
dialogs/setinitialpindialog.cpp
dialogs/setinitialpindialog.h
dialogs/subkeyswidget.cpp
dialogs/subkeyswidget.h
dialogs/trustchainwidget.cpp
dialogs/trustchainwidget.h
dialogs/updatenotification.cpp
dialogs/updatenotification.h
dialogs/weboftrustdialog.cpp
dialogs/weboftrustdialog.h
dialogs/weboftrustwidget.cpp
dialogs/weboftrustwidget.h
interfaces/anchorprovider.h
interfaces/focusfirstchild.h
newcertificatewizard/advancedsettingsdialog.cpp
newcertificatewizard/advancedsettingsdialog_p.h
newcertificatewizard/enterdetailspage.cpp
newcertificatewizard/enterdetailspage_p.h
newcertificatewizard/keyalgo.cpp
newcertificatewizard/keyalgo_p.h
newcertificatewizard/keycreationpage.cpp
newcertificatewizard/keycreationpage_p.h
newcertificatewizard/listwidget.cpp
newcertificatewizard/listwidget.h
newcertificatewizard/newcertificatewizard.cpp
newcertificatewizard/newcertificatewizard.h
newcertificatewizard/resultpage.cpp
newcertificatewizard/resultpage_p.h
newcertificatewizard/wizardpage.cpp
newcertificatewizard/wizardpage_p.h
selftest/compliancecheck.cpp
selftest/compliancecheck.h
selftest/enginecheck.cpp
selftest/enginecheck.h
selftest/gpgagentcheck.cpp
selftest/gpgagentcheck.h
selftest/gpgconfcheck.cpp
selftest/gpgconfcheck.h
selftest/libkleopatrarccheck.cpp
selftest/libkleopatrarccheck.h
selftest/selftest.cpp
selftest/selftest.h
smartcard/algorithminfo.h
smartcard/card.cpp
smartcard/card.h
smartcard/deviceinfowatcher.cpp
smartcard/deviceinfowatcher.h
smartcard/keypairinfo.cpp
smartcard/keypairinfo.h
smartcard/netkeycard.cpp
smartcard/netkeycard.h
smartcard/openpgpcard.cpp
smartcard/openpgpcard.h
smartcard/p15card.cpp
smartcard/p15card.h
smartcard/pivcard.cpp
smartcard/pivcard.h
smartcard/readerstatus.cpp
smartcard/readerstatus.h
smartcard/utils.cpp
smartcard/utils.h
utils/accessibility.cpp
utils/accessibility.h
utils/action_data.cpp
utils/action_data.h
utils/applicationstate.cpp
utils/applicationstate.h
utils/archivedefinition.cpp
utils/archivedefinition.h
utils/clipboardmenu.cpp
utils/clipboardmenu.h
utils/debug-helpers.cpp
utils/debug-helpers.h
utils/dragqueen.cpp
utils/dragqueen.h
utils/email.cpp
utils/email.h
utils/emptypassphraseprovider.cpp
utils/emptypassphraseprovider.h
utils/filedialog.cpp
utils/filedialog.h
utils/gui-helper.cpp
utils/gui-helper.h
utils/headerview.cpp
utils/headerview.h
utils/input.cpp
utils/input.h
utils/iodevicelogger.cpp
utils/iodevicelogger.h
utils/kdpipeiodevice.cpp
utils/kdpipeiodevice.h
utils/keyparameters.cpp
utils/keyparameters.h
utils/keys.cpp
utils/keys.h
utils/kuniqueservice.cpp
utils/kuniqueservice.h
utils/log.cpp
utils/log.h
utils/memory-helpers.h
utils/multivalidator.cpp
utils/multivalidator.h
utils/output.cpp
utils/output.h
utils/path-helper.cpp
utils/path-helper.h
utils/scrollarea.cpp
utils/scrollarea.h
utils/systemtrayicon.cpp
utils/systemtrayicon.h
utils/tags.cpp
utils/tags.h
utils/types.cpp
utils/types.h
utils/userinfo.cpp
utils/userinfo.h
utils/validation.cpp
utils/validation.h
utils/writecertassuantransaction.cpp
utils/writecertassuantransaction.h
utils/wsastarter.cpp
utils/wsastarter.h
view/anchorcache.cpp
view/anchorcache_p.h
view/errorlabel.cpp
view/errorlabel.h
view/formtextinput.cpp
view/formtextinput.h
view/htmllabel.cpp
view/htmllabel.h
view/infofield.cpp
view/infofield.h
view/keycacheoverlay.cpp
view/keycacheoverlay.h
view/keylistcontroller.cpp
view/keylistcontroller.h
view/keytreeview.cpp
view/keytreeview.h
view/netkeywidget.cpp
view/netkeywidget.h
view/nullpinwidget.cpp
view/nullpinwidget.h
view/openpgpkeycardwidget.cpp
view/openpgpkeycardwidget.h
view/p15cardwidget.cpp
view/p15cardwidget.h
view/padwidget.cpp
view/padwidget.h
view/pgpcardwidget.cpp
view/pgpcardwidget.h
view/pivcardwidget.cpp
view/pivcardwidget.h
view/searchbar.cpp
view/searchbar.h
view/smartcardwidget.cpp
view/smartcardwidget.h
view/tabwidget.cpp
view/tabwidget.h
view/urllabel.cpp
view/urllabel.h
view/waitwidget.cpp
view/waitwidget.h
view/welcomewidget.cpp
view/welcomewidget.h
aboutdata.cpp
aboutdata.h
kleopatra.qrc
kleopatraapplication.cpp
kleopatraapplication.h
main.cpp
mainwindow.cpp
mainwindow.h
systrayicon.cpp
systrayicon.h
)
if(WIN32)
configure_file (versioninfo.rc.in versioninfo.rc)
set(_kleopatra_SRCS ${CMAKE_CURRENT_BINARY_DIR}/versioninfo.rc ${_kleopatra_SRCS})
endif()
set (_kleopatra_SRCS conf/kleopageconfigdialog.cpp ${_kleopatra_SRCS})
ecm_qt_declare_logging_category(_kleopatra_SRCS HEADER kleopatra_debug.h IDENTIFIER KLEOPATRA_LOG CATEGORY_NAME org.kde.pim.kleopatra
DESCRIPTION "kleopatra (kleopatra)"
OLD_CATEGORY_NAMES log_kleopatra
EXPORT KLEOPATRA
)
if(KLEO_MODEL_TEST)
add_definitions(-DKLEO_MODEL_TEST)
set(_kleopatra_SRCS ${_kleopatra_SRCS} models/modeltest.cpp)
endif()
ki18n_wrap_ui(_kleopatra_SRCS
dialogs/selectchecklevelwidget.ui
dialogs/setinitialpindialog.ui
dialogs/trustchainwidget.ui
newcertificatewizard/listwidget.ui
)
kconfig_add_kcfg_files(_kleopatra_SRCS
kcfg/emailoperationspreferences.kcfgc
kcfg/fileoperationspreferences.kcfgc
kcfg/settings.kcfgc
kcfg/smimevalidationpreferences.kcfgc
kcfg/tagspreferences.kcfgc
kcfg/tooltippreferences.kcfgc
)
file(GLOB ICONS_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/icons/*-apps-kleopatra.png")
ecm_add_app_icon(_kleopatra_SRCS ICONS ${ICONS_SRCS})
add_executable(kleopatra_bin ${_kleopatra_SRCS} ${_kleopatra_uiserver_SRCS})
# For the ConfigureDialog & KCMs
target_link_libraries(kleopatra_bin kcm_kleopatra_static)
#if (COMPILE_WITH_UNITY_CMAKE_SUPPORT)
# set_target_properties(kleopatra_bin PROPERTIES UNITY_BUILD ON)
#endif()
set_target_properties(kleopatra_bin PROPERTIES OUTPUT_NAME kleopatra)
if (WIN32)
set(_kleopatra_platform_libs "secur32")
endif ()
target_link_libraries(kleopatra_bin
Gpgmepp
${_kleopatra_extra_libs}
KF5::Libkleo
KF5::Mime
KF5::I18n
KF5::XmlGui
KF5::IconThemes
KF5::WindowSystem
KF5::CoreAddons
KF5::ItemModels
KF5::Crash
${_kleopatra_mail_libs}
Qt::Network
Qt::PrintSupport # Printing secret keys
${_kleopatra_uiserver_extra_libs}
${_kleopatra_dbusaddons_libs}
kleopatraclientcore
${_kleopatra_platform_libs}
)
if (QT_MAJOR_VERSION STREQUAL "6")
target_link_libraries(kleopatra_bin QGpgmeQt6)
else()
target_link_libraries(kleopatra_bin QGpgme)
endif()
install(TARGETS kleopatra_bin ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
install(
PROGRAMS data/org.kde.kleopatra.desktop data/kleopatra_import.desktop
DESTINATION ${KDE_INSTALL_APPDIR}
)
install(FILES data/org.kde.kleopatra.appdata.xml DESTINATION ${KDE_INSTALL_METAINFODIR})
install(
PROGRAMS data/kleopatra_signencryptfiles.desktop
data/kleopatra_signencryptfolders.desktop
data/kleopatra_decryptverifyfiles.desktop
data/kleopatra_decryptverifyfolders.desktop
DESTINATION ${KDE_INSTALL_DATADIR}/kio/servicemenus
)
diff --git a/src/libkleopatraclient/core/CMakeLists.txt b/src/libkleopatraclient/core/CMakeLists.txt
index eb03c6c1e..886417433 100644
--- a/src/libkleopatraclient/core/CMakeLists.txt
+++ b/src/libkleopatraclient/core/CMakeLists.txt
@@ -1,59 +1,45 @@
# SPDX-FileCopyrightText: none
# SPDX-License-Identifier: BSD-3-Clause
if(WIN32)
set(_kleopatraclientcore_extra_SRCS ../../utils/gnupg-registry.c)
else()
set(_kleopatraclientcore_extra_SRCS)
endif()
ecm_qt_declare_logging_category(_kleopatraclientcore_common_SRCS HEADER libkleopatraclientcore_debug.h IDENTIFIER LIBKLEOPATRACLIENTCORE_LOG CATEGORY_NAME org.kde.pim.libkleopatraclientcore
DESCRIPTION "kleopatra (kleopatra)"
OLD_CATEGORY_NAMES log_libkleopatraclientcore
EXPORT KLEOPATRA
)
add_library(kleopatraclientcore
${_kleopatraclientcore_extra_SRCS}
initialization.cpp
command.cpp
selectcertificatecommand.cpp
signencryptfilescommand.cpp
decryptverifyfilescommand.cpp
libkleopatraclientcore_debug.cpp
initialization.h
command.h
selectcertificatecommand.h
signencryptfilescommand.h
decryptverifyfilescommand.h
libkleopatraclientcore_debug.h
${_kleopatraclientcore_common_SRCS}
)
generate_export_header(kleopatraclientcore BASE_NAME kleopatraclientcore)
set_target_properties(kleopatraclientcore PROPERTIES
VERSION ${libkleopatraclient_version}
SOVERSION ${libkleopatraclient_soversion}
)
if (COMPILE_WITH_UNITY_CMAKE_SUPPORT)
set_target_properties(kleopatraclientcore PROPERTIES UNITY_BUILD ON)
endif()
-
-if(WIN32)
- target_link_libraries(kleopatraclientcore
-
- ${ASSUAN2_LIBRARIES}
- ws2_32
- )
-else()
- target_link_libraries(kleopatraclientcore
-
- ${ASSUAN2_LIBRARIES}
- )
-endif()
-
-target_link_libraries(kleopatraclientcore Qt::Widgets KF5::I18n Gpgmepp)
+target_link_libraries(kleopatraclientcore ${LibAssuan_LIBRARIES} Qt::Widgets KF5::I18n Gpgmepp)
install(TARGETS kleopatraclientcore ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index cbb7d3aaf..e93a6db31 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -1,76 +1,62 @@
# SPDX-FileCopyrightText: none
# SPDX-License-Identifier: BSD-3-Clause
add_subdirectory(gnupg_home)
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR})
include_directories(
${CMAKE_SOURCE_DIR}/src/
${CMAKE_BINARY_DIR}/src/
${GPGME_INCLUDES}
)
########### next target ###############
set(test_verify_SRCS test_verify.cpp)
add_definitions(-DKLEO_TEST_GNUPGHOME="${CMAKE_CURRENT_BINARY_DIR}/gnupg_home")
add_definitions(-DKLEO_TEST_DATADIR="${CMAKE_CURRENT_SOURCE_DIR}")
add_executable(test_verify ${test_verify_SRCS})
add_test(NAME test_verify COMMAND test_verify)
ecm_mark_as_test(test_verify)
target_link_libraries(test_verify
KF5::Libkleo
Qt::Test
KF5::CoreAddons
KF5::I18n
Qt::Widgets
)
if (QT_MAJOR_VERSION STREQUAL "6")
target_link_libraries(test_verify QGpgmeQt6)
else()
target_link_libraries(test_verify QGpgme)
endif()
########### next target ###############
# this doesn't yet work on Windows
add_definitions(-DGPG_ERR_SOURCE_DEFAULT=GPG_ERR_SOURCE_USER_2)
set(test_uiserver_SRCS test_uiserver.cpp ${CMAKE_SOURCE_DIR}/src/utils/wsastarter.cpp)
#FIXME: omitting TEST makes test_uiserver print output again on a Win32 console;
# find a better fix for this issue
if(WIN32)
add_executable(test_uiserver ${test_uiserver_SRCS})
else()
add_executable(test_uiserver ${test_uiserver_SRCS})
endif()
- target_link_libraries(test_uiserver KF5::I18n)
- target_link_libraries(test_uiserver
- KF5::Libkleo
- ${ASSUAN2_LIBRARIES}
- )
+ target_link_libraries(test_uiserver KF5::I18n KF5::Libkleo ${LibAssuan_LIBRARIES})
- if(WIN32)
- target_link_libraries(test_uiserver
- ${ASSUAN_VANILLA_LIBRARIES}
- ws2_32
- )
- else()
- target_link_libraries(test_uiserver
- ${ASSUAN_PTHREAD_LIBRARIES}
- )
- endif()
if (QT_MAJOR_VERSION STREQUAL "6")
target_link_libraries(test_uiserver QGpgmeQt6)
else()
target_link_libraries(test_uiserver QGpgme)
endif()
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Sat, May 10, 8:48 AM (1 d, 21 h)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
1b/3d/d9e71175e8a494b1838431e6b7eb
Attached To
rKLEOPATRA Kleopatra
Event Timeline
Log In to Comment