summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDominique Leuenberger <dimstar@opensuse.org>2017-08-17 14:28:53 +0200
committerJeremy Bicha <jbicha@ubuntu.com>2018-02-26 22:39:58 -0500
commit2b4aca11cddf82d9c167c6ab6d620101447e88db (patch)
tree60ffd33d6cdc1bba360c8b0ca0841a596dd85c2f
parent0ace4179f5e2b1484a747a15926ef18b093067ec (diff)
downloadgnome-color-manager-2b4aca11cddf82d9c167c6ab6d620101447e88db.tar.gz
build: Do not hardcode installation paths
https://bugzilla.gnome.org/show_bug.cgi?id=786424
-rw-r--r--data/appdata/meson.build2
-rw-r--r--data/figures/meson.build4
-rw-r--r--data/icons/meson.build6
-rw-r--r--data/meson.build2
-rw-r--r--data/targets/meson.build2
-rw-r--r--data/ti1/meson.build2
-rw-r--r--man/meson.build10
-rw-r--r--meson.build28
-rw-r--r--src/meson.build7
9 files changed, 27 insertions, 36 deletions
diff --git a/data/appdata/meson.build b/data/appdata/meson.build
index 63c6913..3a97041 100644
--- a/data/appdata/meson.build
+++ b/data/appdata/meson.build
@@ -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')
)
diff --git a/data/figures/meson.build b/data/figures/meson.build
index 9bf6556..695429a 100644
--- a/data/figures/meson.build
+++ b/data/figures/meson.build
@@ -4,7 +4,7 @@ install_data([
'viewer-example-02.png',
'viewer-example-03.png',
],
- install_dir : 'share/gnome-color-manager/figures'
+ install_dir : join_paths(prefixed_datadir, 'gnome-color-manager/figures')
)
install_data([
@@ -16,5 +16,5 @@ install_data([
'scan-target-good.svg',
'scan-target.svg',
],
- install_dir : 'share/gnome-color-manager/icons'
+ install_dir : join_paths(prefixed_datadir, 'gnome-color-manager/icons')
)
diff --git a/data/icons/meson.build b/data/icons/meson.build
index 9fc2ede..f1b05b3 100644
--- a/data/icons/meson.build
+++ b/data/icons/meson.build
@@ -4,7 +4,7 @@ foreach size: icon_sizes
install_data([
size + '/gnome-color-manager.png',
],
- install_dir : 'share/icons/hicolor/' + size + '/apps',
+ install_dir : join_paths(prefixed_datadir, 'icons/hicolor/' + size + '/apps'),
)
endforeach
@@ -12,7 +12,7 @@ endforeach
install_data([
'scalable/gnome-color-manager.svg',
],
- install_dir : 'share/icons/hicolor/scalable/apps'
+ install_dir : join_paths(prefixed_datadir, 'icons/hicolor/scalable/apps')
)
install_data([
@@ -20,5 +20,5 @@ install_data([
'scalable/crt.svg',
'scalable/projector.svg',
],
- install_dir : 'share/gnome-color-manager/icons/icons'
+ install_dir : join_paths(prefixed_datadir, 'gnome-color-manager/icons/icons')
)
diff --git a/data/meson.build b/data/meson.build
index af8280f..069395c 100644
--- a/data/meson.build
+++ b/data/meson.build
@@ -17,6 +17,6 @@ foreach desktop_file: desktop_files
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')
)
endforeach
diff --git a/data/targets/meson.build b/data/targets/meson.build
index 9f0a0c7..50d33f4 100644
--- a/data/targets/meson.build
+++ b/data/targets/meson.build
@@ -11,5 +11,5 @@ install_data([
'QPcard_202.png',
'unknown.png',
],
- install_dir : 'share/gnome-color-manager/targets'
+ install_dir : join_paths(prefixed_datadir, 'gnome-color-manager/targets')
)
diff --git a/data/ti1/meson.build b/data/ti1/meson.build
index 45cbec6..c16ceed 100644
--- a/data/ti1/meson.build
+++ b/data/ti1/meson.build
@@ -6,5 +6,5 @@ install_data([
'printer-normal.ti1',
'printer-short.ti1',
],
- install_dir : 'share/gnome-color-manager/ti1'
+ install_dir : join_paths(prefixed_datadir, 'gnome-color-manager/ti1')
)
diff --git a/man/meson.build b/man/meson.build
index 81d27f5..594fbb7 100644
--- a/man/meson.build
+++ b/man/meson.build
@@ -5,34 +5,34 @@ if docbook2man.found()
input : 'gcm-calibrate.sgml',
command : [docbook2man, '@INPUT@', '--output', 'man'],
install : true,
- install_dir : 'share/man/man1'
+ install_dir : join_paths(prefixed_mandir, 'man1'),
)
custom_target('gcm-import-man',
output : 'gcm-import.1',
input : 'gcm-import.sgml',
command : [docbook2man, '@INPUT@', '--output', 'man'],
install : true,
- install_dir : 'share/man/man1'
+ install_dir : join_paths(prefixed_mandir, 'man1'),
)
custom_target('gcm-inspect-man',
output : 'gcm-inspect.1',
input : 'gcm-inspect.sgml',
command : [docbook2man, '@INPUT@', '--output', 'man'],
install : true,
- install_dir : 'share/man/man1'
+ install_dir : join_paths(prefixed_mandir, 'man1'),
)
custom_target('gcm-picker-man',
output : 'gcm-picker.1',
input : 'gcm-picker.sgml',
command : [docbook2man, '@INPUT@', '--output', 'man'],
install : true,
- install_dir : 'share/man/man1'
+ install_dir : join_paths(prefixed_mandir, 'man1'),
)
custom_target('gcm-viewer-man',
output : 'gcm-viewer.1',
input : 'gcm-viewer.sgml',
command : [docbook2man, '@INPUT@', '--output', 'man'],
install : true,
- install_dir : 'share/man/man1'
+ install_dir : join_paths(prefixed_mandir, 'man1'),
)
endif
diff --git a/meson.build b/meson.build
index c1773ab..3858b23 100644
--- a/meson.build
+++ b/meson.build
@@ -80,6 +80,13 @@ add_global_link_arguments(
language: 'c'
)
+prefixed_bindir = join_paths(get_option('prefix'), get_option('bindir'))
+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'))
+prefixed_pkgdatadir = join_paths(get_option('prefix'), get_option('datadir'), 'gnome-color-manager')
+
libgio = dependency('gio-2.0', version : '>= 2.25.9')
libgtk = dependency('gtk+-3.0', version : '>= 2.91.0')
libexif = dependency('libexif')
@@ -109,22 +116,11 @@ gnome = import('gnome')
i18n = import('i18n')
conf.set_quoted('GETTEXT_PACKAGE', meson.project_name())
-conf.set_quoted('LOCALEDIR',
- join_paths(get_option('prefix'),
- get_option('localedir')))
-conf.set_quoted('DATADIR',
- join_paths(get_option('prefix'),
- get_option('datadir')))
-conf.set_quoted('PKGDATADIR',
- join_paths(get_option('prefix'),
- get_option('datadir'),
- 'gnome-color-manager'))
-conf.set_quoted('BINDIR',
- join_paths(get_option('prefix'),
- get_option('bindir')))
-conf.set_quoted('LIBEXECDIR',
- join_paths(get_option('prefix'),
- get_option('libexecdir')))
+conf.set_quoted('LOCALEDIR', prefixed_localedir)
+conf.set_quoted('DATADIR', prefixed_datadir)
+conf.set_quoted('PKGDATADIR', prefixed_pkgdatadir)
+conf.set_quoted('BINDIR', prefixed_bindir)
+conf.set_quoted('LIBEXECDIR', prefixed_libexecdir)
configure_file(
output : 'config.h',
configuration : conf
diff --git a/src/meson.build b/src/meson.build
index e904d9f..73ba87c 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -29,7 +29,7 @@ if get_option('enable-exiv')
],
c_args : cargs,
install : true,
- install_dir : get_option('libexecdir'),
+ install_dir : prefixed_libexecdir,
)
endif
@@ -74,7 +74,6 @@ executable(
],
c_args : cargs,
install : true,
- install_dir : 'bin'
)
executable(
@@ -96,7 +95,6 @@ executable(
],
c_args : cargs,
install : true,
- install_dir : 'bin'
)
executable(
@@ -118,7 +116,6 @@ executable(
],
c_args : cargs,
install : true,
- install_dir : 'bin'
)
executable(
@@ -142,7 +139,6 @@ executable(
],
c_args : cargs,
install : true,
- install_dir : 'bin'
)
executable(
@@ -169,7 +165,6 @@ executable(
],
c_args : cargs,
install : true,
- install_dir : 'bin'
)
if get_option('enable-tests')