aboutsummaryrefslogtreecommitdiff
path: root/cmake/FindGPGME.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/FindGPGME.cmake')
-rw-r--r--cmake/FindGPGME.cmake8
1 files changed, 4 insertions, 4 deletions
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)