Changeset View
Changeset View
Standalone View
Standalone View
lang/cpp/src/CMakeLists.txt
- This file was added.
| # SPDX-FileCopyrightText: 2021 Daniel Vrátil <dvratil@kde.org> | |||||
| # SPDX-FileCopyrightText: 2023 g10 Code GmbH | |||||
| # SPDX-FileContributor: Carl Schwan <carl.schwan@gnupg.com> | |||||
| # SPDX-License-Identifier: BSD-3-Clause | |||||
| add_library(Gpgmepp SHARED) | |||||
| target_sources(Gpgmepp PRIVATE | |||||
| callbacks.cpp | |||||
| configuration.cpp | |||||
| context.cpp | |||||
| data.cpp | |||||
| decryptionresult.cpp | |||||
| defaultassuantransaction.cpp | |||||
| editinteractor.cpp | |||||
| encryptionresult.cpp | |||||
| engineinfo.cpp | |||||
| eventloopinteractor.cpp | |||||
| exception.cpp | |||||
| gpgaddexistingsubkeyeditinteractor.cpp | |||||
| gpgadduserideditinteractor.cpp | |||||
| gpgagentgetinfoassuantransaction.cpp | |||||
| gpggencardkeyinteractor.cpp | |||||
| gpgrevokekeyeditinteractor.cpp | |||||
| gpgsetexpirytimeeditinteractor.cpp | |||||
| gpgsetownertrusteditinteractor.cpp | |||||
| gpgsignkeyeditinteractor.cpp | |||||
| importresult.cpp | |||||
| key.cpp | |||||
| keygenerationresult.cpp | |||||
| keylistresult.cpp | |||||
| scdgetinfoassuantransaction.cpp | |||||
| signingresult.cpp | |||||
| statusconsumerassuantransaction.cpp | |||||
| swdbresult.cpp | |||||
| tofuinfo.cpp | |||||
| trustitem.cpp | |||||
| util.cpp | |||||
| verificationresult.cpp | |||||
| vfsmountresult.cpp | |||||
| ) | |||||
| set(gpgmepp_HEADERS | |||||
| callbacks.h | |||||
| configuration.h | |||||
| context.h | |||||
| data.h | |||||
| decryptionresult.h | |||||
| defaultassuantransaction.h | |||||
| editinteractor.h | |||||
| encryptionresult.h | |||||
| engineinfo.h | |||||
| error.h | |||||
| eventloopinteractor.h | |||||
| exception.h | |||||
| global.h | |||||
| gpgaddexistingsubkeyeditinteractor.h | |||||
| gpgadduserideditinteractor.h | |||||
| gpgagentgetinfoassuantransaction.h | |||||
| gpggencardkeyinteractor.h | |||||
| gpgmefw.h | |||||
| gpgmepp_export.h | |||||
| gpgrevokekeyeditinteractor.h | |||||
| gpgsetexpirytimeeditinteractor.h | |||||
| gpgsetownertrusteditinteractor.h | |||||
| gpgsignkeyeditinteractor.h | |||||
| importresult.h | |||||
| key.h | |||||
| keygenerationresult.h | |||||
| keylistresult.h | |||||
| notation.h | |||||
| result.h | |||||
| scdgetinfoassuantransaction.h | |||||
| signingresult.h | |||||
| statusconsumerassuantransaction.h | |||||
| swdbresult.h | |||||
| tofuinfo.h | |||||
| trustitem.h | |||||
| util.h | |||||
| verificationresult.h | |||||
| vfsmountresult.h | |||||
| ) | |||||
| set(gpgmepp_interface_HEADERS | |||||
| interfaces/assuantransaction.h interfaces/dataprovider.h | |||||
| interfaces/passphraseprovider.h interfaces/progressprovider.h | |||||
| ) | |||||
| add_definitions(-DBUILDING_GPGMEPP) | |||||
| target_include_directories(Gpgmepp | |||||
| INTERFACE | |||||
| $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/gpgme++> | |||||
| $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}> | |||||
| PUBLIC | |||||
| $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}> | |||||
| $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}> | |||||
| $<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/src> | |||||
| PRIVATE | |||||
| $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}> | |||||
| ) | |||||
| target_link_libraries(Gpgmepp PUBLIC PkgConfig::GPGME) | |||||
| math(EXPR MAJOR "${LIBGPGMEPP_LT_CURRENT}-${LIBGPGMEPP_LT_AGE}") | |||||
| set_target_properties(Gpgmepp PROPERTIES | |||||
| VERSION "${MAJOR}.${LIBGPGMEPP_LT_AGE}.${LIBGPGMEPP_LT_REVISION}" | |||||
| SOVERSION ${MAJOR} | |||||
| ) | |||||
| configure_package_config_file( | |||||
| "${CMAKE_CURRENT_SOURCE_DIR}/GpgmeppConfigCmake.cmake.in" | |||||
| "${CMAKE_CURRENT_BINARY_DIR}/GpgmeppConfig.cmake" | |||||
| INSTALL_DESTINATION ${GPGME_LIBRARY_DIRS}/cmake/Gpgmepp | |||||
| ) | |||||
| configure_file(${CMAKE_CURRENT_SOURCE_DIR}/GpgmeppConfigVersion.cmake.in | |||||
| ${CMAKE_CURRENT_BINARY_DIR}/GpgmeppConfigVersion.cmake @ONLY) | |||||
| configure_file(${CMAKE_CURRENT_SOURCE_DIR}/gpgmepp_version.h.in | |||||
| ${CMAKE_CURRENT_BINARY_DIR}/gpgmepp_version.h) | |||||
| install(TARGETS Gpgmepp | |||||
| DESTINATION ${GPGME_LIBRARY_DIRS} | |||||
| EXPORT GpgmeppTargets | |||||
| ) | |||||
| install(EXPORT GpgmeppTargets | |||||
| DESTINATION "${GPGME_LIBRARY_DIRS}/cmake/Gpgmepp" | |||||
| FILE GpgmeppConfigTargets.cmake | |||||
| ) | |||||
| install(FILES ${gpgmepp_HEADERS} | |||||
| DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/gpgme++) | |||||
| install(FILES ${gpgmepp_interface_HEADERS} | |||||
| DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/gpgme++/interfaces) | |||||
| install(FILES ${CMAKE_CURRENT_BINARY_DIR}/gpgmepp_version.h | |||||
| ${CMAKE_CURRENT_SOURCE_DIR}/gpgmepp_export.h | |||||
| DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/gpgme++) | |||||
| install(FILES "${CMAKE_CURRENT_BINARY_DIR}/GpgmeppConfigVersion.cmake" | |||||
| "${CMAKE_CURRENT_BINARY_DIR}/GpgmeppConfig.cmake" | |||||
| DESTINATION ${GPGME_LIBRARY_DIRS}/cmake/Gpgmepp) | |||||