From: Steinar H. Gunderson Date: Thu, 18 Apr 2019 20:52:00 +0000 (+0200) Subject: Make the default theme dir pick up the --prefix option given to Meson. X-Git-Tag: 1.8.6~1 X-Git-Url: https://git.sesse.net/?p=nageru;a=commitdiff_plain;h=7afceebf4b8feb5e72fb4b894686deb2b7527502 Make the default theme dir pick up the --prefix option given to Meson. --- diff --git a/meson.build b/meson.build index 4ea2b4d..16dcb4e 100644 --- a/meson.build +++ b/meson.build @@ -47,6 +47,9 @@ add_project_arguments('-DMOVIT_SHADER_DIR="' + movit_shader_dir + '"', language: # Make the Nageru version available as a #define. add_project_arguments('-DNAGERU_VERSION="' + meson.project_version() + '"', language: 'cpp') +# Make the prefix (e.g. /usr/local) available as a #define. +add_project_arguments('-DPREFIX="' + get_option('prefix') + '"', language: 'cpp') + # This needs to be done before declaring any build targets. if get_option('cef_dir') != '' add_project_arguments('-DHAVE_CEF=1', language: 'cpp') diff --git a/nageru/flags.h b/nageru/flags.h index 4d990f8..3586500 100644 --- a/nageru/flags.h +++ b/nageru/flags.h @@ -18,7 +18,7 @@ struct Flags { bool uncompressed_video_to_http = false; bool x264_video_to_http = false; bool x264_video_to_disk = false; // Disables Quick Sync entirely. Implies x264_video_to_http == true. - std::vector theme_dirs { ".", "/usr/local/share/nageru" }; + std::vector theme_dirs { ".", PREFIX "/share/nageru" }; std::string recording_dir = "."; std::string theme_filename = "theme.lua"; bool locut_enabled = true;