summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--meson.build4
-rw-r--r--meson_options.txt3
-rw-r--r--panels/info/cc-info-overview-panel.c2
3 files changed, 6 insertions, 3 deletions
diff --git a/meson.build b/meson.build
index 95f9b25ba..0eae13a95 100644
--- a/meson.build
+++ b/meson.build
@@ -42,7 +42,9 @@ set_defines = [
['PACKAGE_VERSION', meson.project_version()],
['VERSION', meson.project_version()],
# i18n
- ['GETTEXT_PACKAGE', control_center_gettext]
+ ['GETTEXT_PACKAGE', control_center_gettext],
+ # /etc/os-release
+ ['ETC_OS_RELEASE', get_option('etc_os_release')]
]
foreach define: set_defines
diff --git a/meson_options.txt b/meson_options.txt
index a347168b7..29d549a29 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -1,6 +1,7 @@
option('cheese', type: 'boolean', value: true, description: 'build with cheese webcam support')
option('documentation', type: 'boolean', value: false, description: 'build documentation')
+option('etc_os_release', type: 'string', value: '/etc/os-release', description: 'Path to /etc/os-release file')
option('gnome_session_libexecdir', type: 'string', value: '', description: 'Directory for gnome-session\'s libexecdir')
option('ibus', type: 'boolean', value: true, description: 'build with IBus support')
option('tracing', type: 'boolean', value: false, description: 'add extra debugging information')
-option('wayland', type: 'boolean', value: true, description: 'build with Wayland support') \ No newline at end of file
+option('wayland', type: 'boolean', value: true, description: 'build with Wayland support')
diff --git a/panels/info/cc-info-overview-panel.c b/panels/info/cc-info-overview-panel.c
index 0d0a17fcf..2c8ff0bca 100644
--- a/panels/info/cc-info-overview-panel.c
+++ b/panels/info/cc-info-overview-panel.c
@@ -379,7 +379,7 @@ get_os_info (void)
hashtable = NULL;
- if (g_file_get_contents ("/etc/os-release", &buffer, NULL, NULL))
+ if (g_file_get_contents (ETC_OS_RELEASE, &buffer, NULL, NULL))
{
g_auto(GStrv) lines = NULL;
gint i;