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)
|
||||
|
||||
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(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];
|
||||
var iri_query = @"omemo-sid-$(sid)=$(fingerprint)";
|
||||
#if GLIB_2_66
|
||||
// glib >=2.66 only; never compiled
|
||||
#if GLIB_2_66 && VALA_0_50
|
||||
string iri = GLib.Uri.join(UriFlags.NONE, "xmpp", null, null, 0, jid.to_string(), iri_query, null);
|
||||
#else
|
||||
var iri_path_seg = escape_for_iri_path_segment(jid.to_string());
|
||||
|
|
Loading…
Reference in a new issue