aboutsummaryrefslogtreecommitdiff
path: root/main/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'main/CMakeLists.txt')
-rw-r--r--main/CMakeLists.txt11
1 files changed, 8 insertions, 3 deletions
diff --git a/main/CMakeLists.txt b/main/CMakeLists.txt
index 66362fbe..bada486c 100644
--- a/main/CMakeLists.txt
+++ b/main/CMakeLists.txt
@@ -1,3 +1,8 @@
+set(GETTEXT_PACKAGE "dino")
+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(MAIN_PACKAGES REQUIRED
Gee
GLib>=2.38
@@ -106,9 +111,9 @@ GRESOURCES
${MAIN_GRESOURCES_XML}
)
-add_definitions(${VALA_CFLAGS})
+add_definitions(${VALA_CFLAGS} -DGETTEXT_PACKAGE=\"${GETTEXT_PACKAGE}\" -DLOCALE_INSTALL_DIR=\"${LOCALE_INSTALL_DIR}\")
add_executable(dino ${MAIN_VALA_C} ${MAIN_GRESOURCES_TARGET})
-add_dependencies(dino dino-vapi dino-gsettings-schema-compiled)
+add_dependencies(dino dino-vapi dino-gsettings-schema-compiled ${GETTEXT_PACKAGE}-translations)
target_link_libraries(dino libdino ${MAIN_PACKAGES})
if(WIN32)
@@ -129,4 +134,4 @@ install(FILES
data/icons/dino-tick-symbolic.svg
DESTINATION
${ICON_INSTALL_DIR}/hicolor/scalable/status
-)
+) \ No newline at end of file