Fix issues with the meson build

This commit is contained in:
Bnyro
2023-06-26 11:38:25 +02:00
parent fbf4b8dfa5
commit 8e019361f4
9 changed files with 54 additions and 16 deletions

View File

@@ -8,8 +8,10 @@ project(
gnome = import('gnome')
application_id = 'com.lemmygtk.lemoa'
base_id = 'com.lemmygtk.lemoa'
version = meson.project_version()
# Required packages
dependency('glib-2.0', version: '>= 2.70')
dependency('gio-2.0', version: '>= 2.70')
dependency('gtk4', version: '>= 4.10.0')
@@ -19,16 +21,31 @@ glib_compile_schemas = find_program('glib-compile-schemas', required: true)
desktop_file_validate = find_program('desktop-file-validate', required: false)
cargo = find_program('cargo', required: true)
version = meson.project_version()
# Various directories needed for building
prefix = get_option('prefix')
bindir = prefix / get_option('bindir')
datadir = prefix / get_option('datadir')
iconsdir = datadir / 'icons'
applicationsdir = datadir / 'applications'
pkgdatadir = datadir / meson.project_name()
# Add a version suffix for devel builds
if get_option('profile') == 'development'
profile = 'Devel'
vcs_tag = run_command('git', 'rev-parse', '--short', 'HEAD', check: false).stdout().strip()
if vcs_tag == ''
version_suffix = '-devel'
else
version_suffix = '-@0@'.format(vcs_tag)
endif
application_id = '@0@.@1@'.format(base_id, profile)
else
profile = ''
version_suffix = ''
application_id = base_id
endif
# Modules that need to be built
subdir('src')
subdir('data')
@@ -37,4 +54,3 @@ gnome.post_install(
glib_compile_schemas: true,
update_desktop_database: true,
)