Fix build on Vala < 0.50 and pre-release Vala versions
This commit is contained in:
parent
ee4fbf160d
commit
f0ed11ec49
|
@ -199,7 +199,10 @@ include(MultiFind)
|
||||||
include(GlibCompileResourcesSupport)
|
include(GlibCompileResourcesSupport)
|
||||||
|
|
||||||
find_package(GLib ${GLib_GLOBAL_VERSION} REQUIRED)
|
find_package(GLib ${GLib_GLOBAL_VERSION} REQUIRED)
|
||||||
set(CMAKE_VALA_FLAGS "${CMAKE_VALA_FLAGS} --target-glib=${GLib_VERSION}")
|
string(REGEX REPLACE "^([0-9]+)\\.[0-9]+(\\.[0-9]+)?" "\\1" GLib_MAJOR_VERSION "${GLib_VERSION}")
|
||||||
|
string(REGEX REPLACE "^[0-9]+\\.([0-9]+)(\\.[0-9]+)?" "\\1" GLib_MINOR_VERSION "${GLib_VERSION}")
|
||||||
|
math(EXPR GLib_LAST_RELEASE_MINOR_VERSION "${GLib_MINOR_VERSION} / 2 * 2")
|
||||||
|
set(CMAKE_VALA_FLAGS "${CMAKE_VALA_FLAGS} --target-glib=${GLib_MAJOR_VERSION}.${GLib_LAST_RELEASE_MINOR_VERSION}")
|
||||||
|
|
||||||
add_subdirectory(qlite)
|
add_subdirectory(qlite)
|
||||||
add_subdirectory(xmpp-vala)
|
add_subdirectory(xmpp-vala)
|
||||||
|
|
|
@ -93,8 +93,7 @@ public class ContactDetailsDialog : Gtk.Dialog {
|
||||||
|
|
||||||
int sid = plugin.db.identity.row_with(plugin.db.identity.account_id, account.id)[plugin.db.identity.device_id];
|
int sid = plugin.db.identity.row_with(plugin.db.identity.account_id, account.id)[plugin.db.identity.device_id];
|
||||||
var iri_query = @"omemo-sid-$(sid)=$(fingerprint)";
|
var iri_query = @"omemo-sid-$(sid)=$(fingerprint)";
|
||||||
#if GLIB_2_66
|
#if GLIB_2_66 && VALA_0_50
|
||||||
// glib >=2.66 only; never compiled
|
|
||||||
string iri = GLib.Uri.join(UriFlags.NONE, "xmpp", null, null, 0, jid.to_string(), iri_query, null);
|
string iri = GLib.Uri.join(UriFlags.NONE, "xmpp", null, null, 0, jid.to_string(), iri_query, null);
|
||||||
#else
|
#else
|
||||||
var iri_path_seg = escape_for_iri_path_segment(jid.to_string());
|
var iri_path_seg = escape_for_iri_path_segment(jid.to_string());
|
||||||
|
|
Loading…
Reference in a new issue