aboutsummaryrefslogtreecommitdiff
path: root/plugins/openpgp/CMakeLists.txt
diff options
context:
space:
mode:
authorfiaxh <git@mx.ax.lt>2017-04-07 11:09:47 +0200
committerfiaxh <git@mx.ax.lt>2017-04-10 15:47:21 +0200
commit9bc83539d124f9645dc92e9e39001cb0192dae61 (patch)
treea4b22a8ea3e10b6d0050c2e5669729919a1cb477 /plugins/openpgp/CMakeLists.txt
parentd8881c4b16a1cd376dd69304c44444aee581da32 (diff)
downloaddino-9bc83539d124f9645dc92e9e39001cb0192dae61.tar.gz
dino-9bc83539d124f9645dc92e9e39001cb0192dae61.zip
Gettext support
Diffstat (limited to 'plugins/openpgp/CMakeLists.txt')
-rw-r--r--plugins/openpgp/CMakeLists.txt10
1 files changed, 8 insertions, 2 deletions
diff --git a/plugins/openpgp/CMakeLists.txt b/plugins/openpgp/CMakeLists.txt
index 9a1a9d46..b207dc4f 100644
--- a/plugins/openpgp/CMakeLists.txt
+++ b/plugins/openpgp/CMakeLists.txt
@@ -1,3 +1,9 @@
+set(GETTEXT_PACKAGE "dino-openpgp")
+find_package(Gettext)
+include(${GETTEXT_USE_FILE})
+gettext_compile(${GETTEXT_PACKAGE} SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/po TARGET_NAME ${GETTEXT_PACKAGE}-translations)
+
+
find_packages(OPENPGP_PACKAGES REQUIRED
Gee
GLib>=2.38
@@ -42,9 +48,9 @@ GRESOURCES
${OPENPGP_GRESOURCES_XML}
)
-add_definitions(${VALA_CFLAGS})
+add_definitions(${VALA_CFLAGS} -DGETTEXT_PACKAGE=\"${GETTEXT_PACKAGE}\" -DLOCALE_INSTALL_DIR=\"${LOCALE_INSTALL_DIR}\")
add_library(openpgp SHARED ${OPENPGP_VALA_C} ${OPENPGP_GRESOURCES_TARGET})
-add_dependencies(openpgp dino-vapi gpgme-vapi)
+add_dependencies(openpgp dino-vapi gpgme-vapi ${GETTEXT_PACKAGE}-translations)
target_link_libraries(openpgp libdino gpgme-vala ${OPENPGP_PACKAGES})
set_target_properties(openpgp PROPERTIES PREFIX "")
set_target_properties(openpgp PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/plugins/)