build: Use meson.current_source_dir() instead of source_root()
The latter doesn’t work well when building as a subproject — it explicitly refers to the parent project root. Signed-off-by: Philip Withnall <withnall@endlessm.com>
This commit is contained in:
parent
c4853f0f02
commit
d085c7f585
|
@ -8,7 +8,7 @@ endif
|
||||||
resources = gnome.compile_resources(
|
resources = gnome.compile_resources(
|
||||||
'resources',
|
'resources',
|
||||||
'malcontent-ui.gresource.xml',
|
'malcontent-ui.gresource.xml',
|
||||||
source_dir: meson.source_root(),
|
source_dir: meson.current_source_dir(),
|
||||||
)
|
)
|
||||||
|
|
||||||
libmalcontent_ui_sources = [
|
libmalcontent_ui_sources = [
|
||||||
|
|
|
@ -34,8 +34,8 @@ accounts_service_iface_c = custom_target(
|
||||||
)
|
)
|
||||||
|
|
||||||
accounts_service_extension_ifaces = [
|
accounts_service_extension_ifaces = [
|
||||||
join_paths(meson.source_root(), 'accounts-service', 'com.endlessm.ParentalControls.AppFilter.xml'),
|
join_paths(meson.current_source_dir(), '..', '..', 'accounts-service', 'com.endlessm.ParentalControls.AppFilter.xml'),
|
||||||
join_paths(meson.source_root(), 'accounts-service', 'com.endlessm.ParentalControls.SessionLimits.xml'),
|
join_paths(meson.current_source_dir(), '..', '..', 'accounts-service', 'com.endlessm.ParentalControls.SessionLimits.xml'),
|
||||||
]
|
]
|
||||||
|
|
||||||
accounts_service_extension_iface_h = custom_target(
|
accounts_service_extension_iface_h = custom_target(
|
||||||
|
|
|
@ -7,7 +7,7 @@ endif
|
||||||
resources = gnome.compile_resources(
|
resources = gnome.compile_resources(
|
||||||
'resources',
|
'resources',
|
||||||
'malcontent-control.gresource.xml',
|
'malcontent-control.gresource.xml',
|
||||||
source_dir: meson.source_root(),
|
source_dir: meson.current_source_dir(),
|
||||||
)
|
)
|
||||||
|
|
||||||
malcontent_control = executable('malcontent-control',
|
malcontent_control = executable('malcontent-control',
|
||||||
|
@ -40,7 +40,7 @@ desktop_file = i18n.merge_file('desktop-file',
|
||||||
type: 'desktop',
|
type: 'desktop',
|
||||||
input: '@0@.desktop.in'.format(application_id),
|
input: '@0@.desktop.in'.format(application_id),
|
||||||
output: '@0@.desktop'.format(application_id),
|
output: '@0@.desktop'.format(application_id),
|
||||||
po_dir: join_paths(meson.source_root(), 'po'),
|
po_dir: join_paths(meson.current_source_dir(), '..', 'po'),
|
||||||
install: true,
|
install: true,
|
||||||
install_dir: join_paths(get_option('datadir'), 'applications'),
|
install_dir: join_paths(get_option('datadir'), 'applications'),
|
||||||
)
|
)
|
||||||
|
@ -60,7 +60,7 @@ endif
|
||||||
appdata_file = i18n.merge_file('appdata-file',
|
appdata_file = i18n.merge_file('appdata-file',
|
||||||
input: '@0@.appdata.xml.in'.format(application_id),
|
input: '@0@.appdata.xml.in'.format(application_id),
|
||||||
output: '@0@.appdata.xml'.format(application_id),
|
output: '@0@.appdata.xml'.format(application_id),
|
||||||
po_dir: join_paths(meson.source_root(), 'po'),
|
po_dir: join_paths(meson.current_source_dir(), '..', 'po'),
|
||||||
install: true,
|
install: true,
|
||||||
install_dir: join_paths(get_option('datadir'), 'metainfo'),
|
install_dir: join_paths(get_option('datadir'), 'metainfo'),
|
||||||
)
|
)
|
||||||
|
@ -97,7 +97,7 @@ endif
|
||||||
policy_file = i18n.merge_file('policy-file',
|
policy_file = i18n.merge_file('policy-file',
|
||||||
input: '@0@.policy.in'.format(application_id),
|
input: '@0@.policy.in'.format(application_id),
|
||||||
output: '@0@.policy'.format(application_id),
|
output: '@0@.policy'.format(application_id),
|
||||||
po_dir: join_paths(meson.source_root(), 'po'),
|
po_dir: join_paths(meson.current_source_dir(), '..', 'po'),
|
||||||
install: true,
|
install: true,
|
||||||
install_dir: join_paths(get_option('datadir'), 'polkit-1', 'actions'),
|
install_dir: join_paths(get_option('datadir'), 'polkit-1', 'actions'),
|
||||||
)
|
)
|
||||||
|
|
|
@ -13,8 +13,8 @@ gnome = import('gnome')
|
||||||
i18n = import('i18n')
|
i18n = import('i18n')
|
||||||
pkgconfig = import('pkgconfig')
|
pkgconfig = import('pkgconfig')
|
||||||
|
|
||||||
meson_make_symlink = join_paths(meson.source_root(), 'tools', 'meson-make-symlink.py')
|
meson_make_symlink = join_paths(meson.current_source_dir(), 'tools', 'meson-make-symlink.py')
|
||||||
po_dir = join_paths(meson.source_root(), 'po')
|
po_dir = join_paths(meson.current_source_dir(), 'po')
|
||||||
|
|
||||||
prefix = get_option('prefix')
|
prefix = get_option('prefix')
|
||||||
bindir = join_paths(prefix, get_option('bindir'))
|
bindir = join_paths(prefix, get_option('bindir'))
|
||||||
|
|
Loading…
Reference in New Issue