]> git.sesse.net Git - nageru/commitdiff
Make the default theme dir pick up the --prefix option given to Meson.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Thu, 18 Apr 2019 20:52:00 +0000 (22:52 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Thu, 18 Apr 2019 20:52:00 +0000 (22:52 +0200)
meson.build
nageru/flags.h

index 4ea2b4d3ad289ef144a707f767eea881519b18ac..16dcb4e370a45fdc978a94c0276a8f5327a67a52 100644 (file)
@@ -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')
index 4d990f8511d7a2fb7567fb2195a0e31c5c2a2e16..3586500c3057232f5f35d3502b4e6f741f774b99 100644 (file)
@@ -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<std::string> theme_dirs { ".", "/usr/local/share/nageru" };
+       std::vector<std::string> theme_dirs { ".", PREFIX "/share/nageru" };
        std::string recording_dir = ".";
        std::string theme_filename = "theme.lua";
        bool locut_enabled = true;