|
| 1 | +diff --git a/CMakeLists.txt b/CMakeLists.txt |
| 2 | +index 33a55c7..ed169aa 100644 |
| 3 | +--- a/CMakeLists.txt |
| 4 | ++++ b/CMakeLists.txt |
| 5 | +@@ -62,10 +62,8 @@ include(ECMUninstallTarget) |
| 6 | + include(FeatureSummary) |
| 7 | + include(GNUInstallDirs) |
| 8 | + |
| 9 | +-find_package(LibGpgError ${GPG_ERROR_REQUIRED_VERSION}) |
| 10 | +-set_package_properties(LibGpgError PROPERTIES TYPE REQUIRED) |
| 11 | +-find_package(Gpgme ${GPGME_REQUIRED_VERSION}) |
| 12 | +-set_package_properties(Gpgme PROPERTIES TYPE REQUIRED) |
| 13 | ++find_package(PkgConfig REQUIRED) |
| 14 | ++pkg_check_modules(Gpgme "gpgme>=${GPGME_REQUIRED_VERSION}" "gpg-error>=${GPG_ERROR_REQUIRED_VERSION}" REQUIRED) |
| 15 | + |
| 16 | + g10_get_full_version() |
| 17 | + |
| 18 | +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt |
| 19 | +index d28ed8f..989a011 100644 |
| 20 | +--- a/src/CMakeLists.txt |
| 21 | ++++ b/src/CMakeLists.txt |
| 22 | +@@ -126,11 +126,11 @@ if(ENABLE_SHARED) |
| 23 | + target_sources(Gpgmepp PRIVATE ${Gpgmepp_SOURCES}) |
| 24 | + |
| 25 | + target_include_directories(Gpgmepp |
| 26 | +- PRIVATE ${LibGpgError_INCLUDE_DIRS} |
| 27 | ++ PRIVATE ${Gpgme_INCLUDE_DIRS} |
| 28 | + INTERFACE $<INSTALL_INTERFACE:include> |
| 29 | + ) |
| 30 | + |
| 31 | +- target_link_libraries(Gpgmepp Gpgme::Gpgme) |
| 32 | ++ target_link_libraries(Gpgmepp PRIVATE ${Gpgme_LINK_LIBRARIES}) |
| 33 | + |
| 34 | + set_target_properties(Gpgmepp PROPERTIES |
| 35 | + OUTPUT_NAME gpgmepp |
| 36 | +@@ -142,11 +142,11 @@ if(ENABLE_STATIC) |
| 37 | + target_sources(GpgmeppStatic PRIVATE ${Gpgmepp_SOURCES}) |
| 38 | + |
| 39 | + target_include_directories(GpgmeppStatic |
| 40 | +- PRIVATE ${LibGpgError_INCLUDE_DIRS} |
| 41 | ++ PRIVATE ${Gpgme_INCLUDE_DIRS} |
| 42 | + INTERFACE $<INSTALL_INTERFACE:include> |
| 43 | + ) |
| 44 | + |
| 45 | +- target_link_libraries(GpgmeppStatic Gpgme::Gpgme) |
| 46 | ++ target_link_libraries(GpgmeppStatic PRIVATE ${Gpgme_LINK_LIBRARIES}) |
| 47 | + |
| 48 | + set_target_properties(GpgmeppStatic PROPERTIES |
| 49 | + OUTPUT_NAME gpgmepp |
| 50 | +diff --git a/src/GpgmeppConfig.cmake.in b/src/GpgmeppConfig.cmake.in |
| 51 | +index 8969602..4d5fedd 100644 |
| 52 | +--- a/src/GpgmeppConfig.cmake.in |
| 53 | ++++ b/src/GpgmeppConfig.cmake.in |
| 54 | +@@ -20,9 +20,5 @@ |
| 55 | + |
| 56 | + @PACKAGE_INIT@ |
| 57 | + |
| 58 | +-include(CMakeFindDependencyMacro) |
| 59 | +-list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}") |
| 60 | +-find_dependency(LibGpgError "@GPG_ERROR_REQUIRED_VERSION@") |
| 61 | +-find_dependency(Gpgme "@GPGME_REQUIRED_VERSION@") |
| 62 | + |
| 63 | + include("${CMAKE_CURRENT_LIST_DIR}/GpgmeppTargets.cmake") |
0 commit comments