aboutsummaryrefslogtreecommitdiff
path: root/plugins/crypto-vala/CMakeLists.txt
diff options
context:
space:
mode:
authorMarvin W <git@larma.de>2019-09-10 20:55:24 +0200
committerMarvin W <git@larma.de>2019-09-16 23:31:11 +0200
commit87d64524c8e4397515be045901427e71b660134f (patch)
tree491a80731746c5b85d889901b4e37469feeb952d /plugins/crypto-vala/CMakeLists.txt
parent784319a9c162896dbaaf3beb4a9f8ba777b149ff (diff)
downloaddino-87d64524c8e4397515be045901427e71b660134f.tar.gz
dino-87d64524c8e4397515be045901427e71b660134f.zip
Add basic crypto-vala
Diffstat (limited to 'plugins/crypto-vala/CMakeLists.txt')
-rw-r--r--plugins/crypto-vala/CMakeLists.txt28
1 files changed, 28 insertions, 0 deletions
diff --git a/plugins/crypto-vala/CMakeLists.txt b/plugins/crypto-vala/CMakeLists.txt
new file mode 100644
index 00000000..89f161b6
--- /dev/null
+++ b/plugins/crypto-vala/CMakeLists.txt
@@ -0,0 +1,28 @@
+find_package(GCrypt REQUIRED)
+find_packages(CRYPTO_VALA_PACKAGES REQUIRED
+ GLib
+ GObject
+ GIO
+)
+
+vala_precompile(CRYPTO_VALA_C
+SOURCES
+ "src/cipher.vala"
+ "src/cipher_converter.vala"
+ "src/error.vala"
+CUSTOM_VAPIS
+ "${CMAKE_CURRENT_SOURCE_DIR}/vapi/gcrypt.vapi"
+PACKAGES
+ ${CRYPTO_VALA_PACKAGES}
+GENERATE_VAPI
+ crypto-vala
+GENERATE_HEADER
+ crypto-vala
+)
+
+set(CFLAGS ${VALA_CFLAGS} -I${CMAKE_CURRENT_SOURCE_DIR}/src)
+add_definitions(${CFLAGS})
+add_library(crypto-vala ${CRYPTO_VALA_C})
+target_link_libraries(crypto-vala ${CRYPTO_VALA_PACKAGES} gcrypt)
+set_property(TARGET crypto-vala PROPERTY POSITION_INDEPENDENT_CODE ON)
+