diff --git a/CMakeLists.txt b/CMakeLists.txt index 68ce9537..b030d4a0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -39,7 +39,11 @@ PKG_CHECK_MODULES(LIBXML2 libxml-2.0 REQUIRED) FIND_PACKAGE(CURL 7.52.0 REQUIRED) IF (USE_GPGME) - FIND_PACKAGE(Gpgme REQUIRED) + PKG_SEARCH_MODULE(GPGME gpgme) + IF (NOT GPGME_FOUND) + FIND_PACKAGE(Gpgme REQUIRED) + SET (GPGME_LIBRARIES "${GPGME_VANILLA_LIBRARIES}") + ENDIF(NOT GPGME_FOUND) IF (ENABLE_SELINUX) PKG_CHECK_MODULES(SELINUX REQUIRED libselinux) ENDIF(ENABLE_SELINUX) diff --git a/librepo/CMakeLists.txt b/librepo/CMakeLists.txt index 68d78677..3a1ef840 100644 --- a/librepo/CMakeLists.txt +++ b/librepo/CMakeLists.txt @@ -70,7 +70,7 @@ TARGET_LINK_LIBRARIES(librepo ${GLIB2_LIBRARIES} ) IF (USE_GPGME) - TARGET_LINK_LIBRARIES(librepo ${GPGME_VANILLA_LIBRARIES}) + TARGET_LINK_LIBRARIES(librepo ${GPGME_LIBRARIES}) IF (ENABLE_SELINUX) TARGET_LINK_LIBRARIES(librepo ${SELINUX_LIBRARIES}) ENDIF(ENABLE_SELINUX)