diff options
Diffstat (limited to 'libdino')
-rw-r--r-- | libdino/CMakeLists.txt | 2 | ||||
-rw-r--r-- | libdino/src/application.vala | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/libdino/CMakeLists.txt b/libdino/CMakeLists.txt index ce836f62..20f5ffee 100644 --- a/libdino/CMakeLists.txt +++ b/libdino/CMakeLists.txt @@ -89,7 +89,7 @@ DEPENDS ${CMAKE_BINARY_DIR}/exports/dino_i18n.h ) -add_definitions(${VALA_CFLAGS} -DDINO_SYSTEM_PLUGIN_DIR="${PLUGIN_INSTALL_DIR}" -DDINO_SYSTEM_LIBDIR_NAME="${LIBDIR_NAME}" -DG_LOG_DOMAIN="libdino") +add_definitions(${VALA_CFLAGS} -DDINO_SYSTEM_PLUGIN_DIR="${PLUGIN_INSTALL_DIR}" -DDINO_SYSTEM_LIBDIR_NAME="${LIBDIR_NAME}" -DG_LOG_DOMAIN="libdino" -DDINO_VERSION=\"${PROJECT_VERSION}\") add_library(libdino SHARED ${LIBDINO_VALA_C} ${CMAKE_BINARY_DIR}/exports/dino_i18n.h) add_dependencies(libdino dino-vapi) target_link_libraries(libdino xmpp-vala qlite ${LIBDINO_PACKAGES} m) diff --git a/libdino/src/application.vala b/libdino/src/application.vala index f381c21d..9b36dd79 100644 --- a/libdino/src/application.vala +++ b/libdino/src/application.vala @@ -1,7 +1,13 @@ using Dino.Entities; namespace Dino { + extern const string VERSION; +public string get_version() { return VERSION; } +public string get_short_version() { + if (!VERSION.contains("~")) return VERSION; + return VERSION.split("~")[0] + "+"; +} public interface Application : GLib.Application { |