meson: Fix GTK shortcuts window vala flag

When GTK version 3.19 or higher is used, a custom define is used for
GTK shortcuts window support. This is not working due to a bad
version comparison and the vala flag is not appended.

This has been fixed and is working properly now.
This commit is contained in:
Iñigo Martínez 2018-10-05 09:49:35 +02:00 committed by Alberto Fanjul
parent bcac876e05
commit 332099260c
2 changed files with 3 additions and 3 deletions

View file

@ -116,10 +116,10 @@ sources += gnome.compile_resources(
export: true,
)
vala_flags = '--gresourcesdir=' + join_paths(meson.current_source_dir(), 'resources')
vala_flags = ['--gresourcesdir=' + join_paths(meson.current_source_dir(), 'resources')]
if gtk_shortcuts_window
vala_args += '--define GTK_SHORTCUTS_WINDOW'
vala_flags += '--define=GTK_SHORTCUTS_WINDOW'
endif
executable(

View file

@ -154,7 +154,7 @@ assert(
)
# gtk required version is set to 3.20, so this will be always true
gtk_shortcuts_window = gtk_dep.version().version_compare('3.19')
gtk_shortcuts_window = gtk_dep.version().version_compare('>= 3.19')
m_dep = cc.find_library('m', required: false)