Commit 4c957e42 authored by Emmanuele Bassi's avatar Emmanuele Bassi Committed by Jeremy Bicha

build: Do not hardcode installation paths

Always use the configuration options from Meson.

Closes #4
parent 80e651a1
......@@ -4,5 +4,5 @@ i18n.merge_file(
type: 'xml',
po_dir: join_paths(meson.source_root(), 'po'),
install: true,
install_dir: join_paths(get_option('datadir'), 'metainfo')
install_dir: join_paths(prefixed_datadir, 'metainfo'),
)
install_data('16x16/org.gnome.MultiWriter.png',
install_dir : 'share/icons/hicolor/16x16/apps')
install_dir : join_paths(prefixed_datadir, 'icons/hicolor/16x16/apps'))
install_data('22x22/org.gnome.MultiWriter.png',
install_dir : 'share/icons/hicolor/22x22/apps')
install_dir : join_paths(prefixed_datadir, 'icons/hicolor/22x22/apps'))
install_data('32x32/org.gnome.MultiWriter.png',
install_dir : 'share/icons/hicolor/32x32/apps')
install_dir : join_paths(prefixed_datadir, 'icons/hicolor/32x32/apps'))
install_data('48x48/org.gnome.MultiWriter.png',
install_dir : 'share/icons/hicolor/48x48/apps')
install_dir : join_paths(prefixed_datadir, 'icons/hicolor/48x48/apps'))
install_data('256x256/org.gnome.MultiWriter.png',
install_dir : 'share/icons/hicolor/256x256/apps')
install_dir : join_paths(prefixed_datadir, 'icons/hicolor/256x256/apps'))
......@@ -3,7 +3,7 @@ subdir('icons')
compiled = gnome.compile_schemas()
install_data('org.gnome.MultiWriter.gschema.xml',
install_dir : 'share/glib-2.0/schemas'
install_dir : 'share/glib-2.0/schemas',
)
i18n.merge_file(
......@@ -12,7 +12,7 @@ i18n.merge_file(
type: 'desktop',
po_dir: join_paths(meson.source_root(), 'po'),
install: true,
install_dir: join_paths(get_option('datadir'), 'applications')
install_dir: join_paths(prefixed_datadir, 'applications'),
)
i18n.merge_file(
......@@ -21,5 +21,5 @@ i18n.merge_file(
type: 'xml',
po_dir: join_paths(meson.source_root(), 'po'),
install: true,
install_dir: join_paths(get_option('datadir'), 'polkit-1', 'actions')
install_dir: join_paths(prefixed_datadir, 'polkit-1', 'actions'),
)
......@@ -5,6 +5,6 @@ if docbook2man.found()
input : 'gnome-multi-writer.sgml',
command : [docbook2man, '@INPUT@', '--output', 'man'],
install : true,
install_dir : 'share/man/man1'
install_dir : join_paths(prefixed_mandir, 'man1'),
)
endif
......@@ -74,9 +74,14 @@ foreach arg: test_link_args
endforeach
add_global_link_arguments(
global_link_args,
language: 'c'
language: 'c',
)
prefixed_localedir = join_paths(get_option('prefix'), get_option('localedir'))
prefixed_libexecdir = join_paths(get_option('prefix'), get_option('libexecdir'))
prefixed_mandir = join_paths(get_option('prefix'), get_option('mandir'))
prefixed_datadir = join_paths(get_option('prefix'), get_option('datadir'))
gtk = dependency('gtk+-3.0', version : '>= 3.11.2')
gio = dependency('gio-2.0')
gusb = dependency('gusb', version : '>= 0.2.7')
......@@ -90,15 +95,12 @@ i18n = import('i18n')
conf.set_quoted('GETTEXT_PACKAGE', meson.project_name())
conf.set_quoted('VERSION', meson.project_version())
conf.set_quoted('LOCALEDIR',
join_paths(get_option('prefix'),
get_option('localedir')))
conf.set_quoted('LIBEXECDIR',
join_paths(get_option('prefix'),
get_option('libexecdir')))
conf.set_quoted('LOCALEDIR', prefixed_localedir)
conf.set_quoted('LIBEXECDIR', prefixed_libexecdir)
configure_file(
output : 'config.h',
configuration : conf
configuration : conf,
)
subdir('src')
......
......@@ -4,7 +4,7 @@ gnome_multi_writer_resources = gnome.compile_resources(
'gnome-multi-writer-resources',
'gnome-multi-writer.gresource.xml',
source_dir : '.',
c_name : 'gmw'
c_name : 'gmw',
)
executable(
......@@ -27,7 +27,6 @@ executable(
],
c_args : cargs,
install : true,
install_dir : 'bin'
)
executable(
......@@ -44,5 +43,5 @@ executable(
],
c_args : cargs,
install : true,
install_dir : 'libexec'
install_dir : prefixed_libexecdir,
)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment