[beast: 2/9] SFI: load plugins from objdir if installpath_override() is used



commit e56ec0bb36c4beedcd5c31ebb6cf357bf07f4d56
Author: Tim Janik <timj gnu org>
Date:   Fri May 26 00:07:05 2017 +0200

    SFI: load plugins from objdir if installpath_override() is used
    
    Signed-off-by: Tim Janik <timj gnu org>

 sfi/glib-extra.cc |    8 +++++---
 sfi/glib-extra.hh |    1 +
 2 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/sfi/glib-extra.cc b/sfi/glib-extra.cc
index 8f4d6be..9b48f8f 100644
--- a/sfi/glib-extra.cc
+++ b/sfi/glib-extra.cc
@@ -1043,6 +1043,7 @@ std::string
 installpath (InstallpathType installpath_type)
 {
   const bool ovr = !installpath_topdir.empty();
+  const std::string _libs = ovr ? std::string ("/") + CONFIGURE_INSTALLPATH_OBJDIR : "";
   switch (installpath_type)
     {
     case INSTALLPATH_BSEINCLUDEDIR:                     return CONFIGURE_INSTALLPATH_BSEINCLUDEDIR;
@@ -1052,9 +1053,9 @@ installpath (InstallpathType installpath_type)
     case INSTALLPATH_DOCDIR:                            return CONFIGURE_INSTALLPATH_DOCDIR;
     case INSTALLPATH_USER_DATA:                         return CONFIGURE_INSTALLPATH_USER_DATA;
     case INSTALLPATH_BSELIBDIR:                         return ovr ? installpath_topdir : 
CONFIGURE_INSTALLPATH_BSELIBDIR;
-    case INSTALLPATH_BSELIBDIR_PLUGINS:                 return installpath (INSTALLPATH_BSELIBDIR) + 
"/plugins";
-    case INSTALLPATH_BSELIBDIR_DRIVERS:                 return installpath (INSTALLPATH_BSELIBDIR) + 
"/drivers";
-    case INSTALLPATH_DATADIR:                           return CONFIGURE_INSTALLPATH_DATADIR;
+    case INSTALLPATH_BSELIBDIR_PLUGINS:                 return installpath (INSTALLPATH_BSELIBDIR) + 
"/plugins" + _libs;
+    case INSTALLPATH_BSELIBDIR_DRIVERS:                 return installpath (INSTALLPATH_BSELIBDIR) + 
"/drivers" + _libs;
+    case INSTALLPATH_DATADIR:                           return ovr ? installpath_topdir + "/library" : 
CONFIGURE_INSTALLPATH_DATADIR;
     case INSTALLPATH_DATADIR_DEMO:                      return installpath (INSTALLPATH_DATADIR) + "/demo";
     case INSTALLPATH_DATADIR_SAMPLES:                   return installpath (INSTALLPATH_DATADIR) + 
"/samples";
     case INSTALLPATH_DATADIR_EFFECTS:                   return installpath (INSTALLPATH_DATADIR) + 
"/effects";
@@ -1065,6 +1066,7 @@ installpath (InstallpathType installpath_type)
     case INSTALLPATH_DATADIR_SKINS:                     return installpath (INSTALLPATH_DATADIR) + "/skins";
     case INSTALLPATH_BEASTEXECDIR:                      return ovr ? installpath_topdir : 
CONFIGURE_INSTALLPATH_BEASTEXECDIR;
     case INSTALLPATH_PYBEASTDIR:                        return installpath (INSTALLPATH_BEASTEXECDIR) + 
"/pybeast";
+    case INSTALLPATH_OBJDIR:                            return CONFIGURE_INSTALLPATH_OBJDIR;
     }
   return "";
 }
diff --git a/sfi/glib-extra.hh b/sfi/glib-extra.hh
index 3193e89..7e5ada0 100644
--- a/sfi/glib-extra.hh
+++ b/sfi/glib-extra.hh
@@ -351,6 +351,7 @@ enum InstallpathType {
   INSTALLPATH_DATADIR_SKINS,
   INSTALLPATH_BEASTEXECDIR,
   INSTALLPATH_PYBEASTDIR,
+  INSTALLPATH_OBJDIR,
 };
 /// Provide installation directories and searchpaths for various types of data.
 std::string installpath          (InstallpathType installpath_type);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]