From b63e5f5f9fc0fcd85adf2f93f65d61abd4cc0681 Mon Sep 17 00:00:00 2001 From: Marvin W Date: Fri, 24 Mar 2017 10:40:48 +0100 Subject: Some caching and fix gpgme on some systems --- cmake/FindGPGME.cmake | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'cmake') diff --git a/cmake/FindGPGME.cmake b/cmake/FindGPGME.cmake index 90f734fe..02fa7593 100644 --- a/cmake/FindGPGME.cmake +++ b/cmake/FindGPGME.cmake @@ -20,14 +20,14 @@ if(GPGME_CONFIG_EXECUTABLE) OUTPUT_VARIABLE GPGME_LDFLAGS OUTPUT_STRIP_TRAILING_WHITESPACE) - string(REGEX REPLACE "^(.* |)-l([^ ]*)$( .*|)" "\\2" GPGME_LIBRARY "${GPGME_LDFLAGS}") - string(REGEX REPLACE "^(.* |)-L([^ ]*)$( .*|)" "\\2" GPGME_LIBRARY_DIRS "${GPGME_LDFLAGS}") + string(REGEX REPLACE "^(.* |)-l([^ ]*gpgme[^ ]*)( .*|)$" "\\2" GPGME_LIBRARY "${GPGME_LDFLAGS}") + string(REGEX REPLACE "^(.* |)-L([^ ]*)( .*|)$" "\\2" GPGME_LIBRARY_DIRS "${GPGME_LDFLAGS}") find_library(LIB_NAME_GPGME ${GPGME_LIBRARY} HINTS ${GPGME_LIBRARY_DIRS}) set(GPGME_LIBRARY ${LIB_NAME_GPGME}) if(NOT TARGET gpgme) - add_library(gpgme SHARED IMPORTED) - set_property(TARGET gpgme PROPERTY IMPORTED_LOCATION "${GPGME_LIBRARY}") + add_library(gpgme INTERFACE IMPORTED) + set_property(TARGET gpgme PROPERTY INTERFACE_LINK_LIBRARIES "${GPGME_LDFLAGS}") set_property(TARGET gpgme PROPERTY INTERFACE_COMPILE_OPTIONS "${GPGME_CFLAGS}") endif(NOT TARGET gpgme) endif(GPGME_CONFIG_EXECUTABLE) -- cgit v1.2.3-70-g09d2