Skip to content

Commit

Permalink
Prefer pkgconf to find gpgme
Browse files Browse the repository at this point in the history
gpgme-config has been deprecated and is not available in some
distributions such as Debian, so prefer pkg-config and only use it as
a fallback.

Co-authored-by: Andreas Metzler <[email protected]>
  • Loading branch information
bluca and Andreas Metzler committed Nov 7, 2024
1 parent 7955987 commit 91cd185
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion librepo/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 91cd185

Please sign in to comment.