aboutsummaryrefslogtreecommitdiff
path: root/cmake/FindGPGME.cmake
diff options
context:
space:
mode:
authorfiaxh <git@mx.ax.lt>2017-03-02 15:37:32 +0100
committerfiaxh <git@mx.ax.lt>2017-03-02 15:37:32 +0100
commit56bc45ce4d07a7a9a415e9dc8ad2f7c3f3c9e48d (patch)
tree0bd0c2c80cb81179c26282fb3fbe8fd22983f40b /cmake/FindGPGME.cmake
downloaddino-56bc45ce4d07a7a9a415e9dc8ad2f7c3f3c9e48d.tar.gz
dino-56bc45ce4d07a7a9a415e9dc8ad2f7c3f3c9e48d.zip
Initial commit
Diffstat (limited to 'cmake/FindGPGME.cmake')
-rw-r--r--cmake/FindGPGME.cmake27
1 files changed, 27 insertions, 0 deletions
diff --git a/cmake/FindGPGME.cmake b/cmake/FindGPGME.cmake
new file mode 100644
index 00000000..fd096363
--- /dev/null
+++ b/cmake/FindGPGME.cmake
@@ -0,0 +1,27 @@
+# TODO: Windows related stuff
+
+find_program(GPGME_CONFIG_EXECUTABLE NAMES gpgme-config)
+mark_as_advanced(GPGME_CONFIG_EXECUTABLE)
+
+if(GPGME_CONFIG_EXECUTABLE)
+ execute_process(COMMAND ${GPGME_CONFIG_EXECUTABLE} --version
+ OUTPUT_VARIABLE GPGME_VERSION
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+
+ execute_process(COMMAND ${GPGME_CONFIG_EXECUTABLE} --api-version
+ OUTPUT_VARIABLE GPGME_API_VERSION
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+
+ execute_process(COMMAND ${GPGME_CONFIG_EXECUTABLE} --cflags
+ OUTPUT_VARIABLE GPGME_CFLAGS
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+
+ execute_process(COMMAND ${GPGME_CONFIG_EXECUTABLE} --libs
+ OUTPUT_VARIABLE GPGME_LIBRARIES
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+endif(GPGME_CONFIG_EXECUTABLE)
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(GPGME
+ REQUIRED_VARS GPGME_CONFIG_EXECUTABLE
+ VERSION_VAR GPGME_VERSION) \ No newline at end of file