New features:
diff --git a/meson.build b/meson.build index 69bfd963..35fc9f31 100644 --- a/meson.build +++ b/meson.build @@ -2,6 +2,7 @@ project('io.elementary.settings-daemon', 'c', 'vala', version: '1.3.0', license: 'GPL3', + meson_version: '>=0.58.0' ) fwupd_dep = dependency('fwupd') @@ -27,11 +28,15 @@ cc = meson.get_compiler('c') m_dep = cc.find_library('m', required : false) libgeoclue_dep = dependency ('libgeoclue-2.0') +prefix = get_option('prefix') +datadir = prefix / get_option('datadir') +sysconfdir = get_option('sysconfdir') + conf_data = configuration_data() conf_data.set('PROJECT_NAME', meson.project_name()) conf_data.set('VERSION', meson.project_version()) conf_data.set('GETTEXT_PACKAGE', gettext_package) -conf_data.set('LOCALEDIR', join_paths (get_option('prefix'), get_option('localedir'))) +conf_data.set('LOCALEDIR', prefix / get_option('localedir')) config_file = configure_file( input: 'config.vala.in', @@ -44,9 +49,6 @@ config_dep = declare_dependency( include_directories: include_directories('.') ) -prefix = get_option('prefix') -datadir = join_paths(prefix, get_option('datadir')) - symlink = join_paths(meson.current_source_dir (), 'meson', 'create-symlink.sh') subdir('data') diff --git a/po/meson.build b/po/meson.build index c296095a..c5bd751e 100644 --- a/po/meson.build +++ b/po/meson.build @@ -1,5 +1,5 @@ i18n.gettext('extra', - args: '--directory=' + meson.source_root(), + args: '--directory=' + meson.project_source_root(), preset: 'glib', install: false ) diff --git a/settings-portal/meson.build b/settings-portal/meson.build index 93ea855c..a79dd147 100644 --- a/settings-portal/meson.build +++ b/settings-portal/meson.build @@ -1,4 +1,4 @@ -libexec_dir = join_paths(get_option('prefix'), get_option ('libexecdir')) +libexec_dir = prefix / get_option ('libexecdir') portal_sources = files( 'Main.vala', @@ -26,7 +26,7 @@ if systemd_systemduserunitdir != 'no' if systemd_systemduserunitdir == '' systemd_dep = dependency('systemd', version: '>= 206', required: false) assert(systemd_dep.found(), 'systemd required but not found, please provide a valid systemd user unit dir or disable it') - systemd_systemduserunitdir = systemd_dep.get_pkgconfig_variable('systemduserunitdir', define_variable: ['prefix', get_option('prefix')]) + systemd_systemduserunitdir = systemd_dep.get_variable('systemduserunitdir', pkgconfig_define: ['prefix', prefix]) endif configure_file( @@ -40,7 +40,7 @@ endif install_data( 'io.elementary.settings-daemon.portal', - install_dir: join_paths(get_option('prefix'), get_option('datadir'), 'xdg-desktop-portal', 'portals') + install_dir: datadir / 'xdg-desktop-portal' / 'portals' ) configure_file( @@ -48,5 +48,5 @@ configure_file( output: '@BASENAME@', configuration: portal_conf_data, install: true, - install_dir: join_paths(get_option('prefix'), get_option('datadir'), 'dbus-1', 'services') + install_dir: datadir / 'dbus-1' / 'services' )