mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-06 13:45:43 +01:00
use explicit envvar to define where to find the soundgrid library(ies)
git-svn-id: svn://localhost/ardour2/branches/3.0-SG@12397 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
89df06eb2d
commit
ee2017d9ee
1 changed files with 19 additions and 2 deletions
|
|
@ -17,6 +17,8 @@
|
|||
|
||||
*/
|
||||
|
||||
#include <glibmm/miscutils.h>
|
||||
|
||||
#include <dlfcn.h>
|
||||
#include <iostream>
|
||||
|
||||
|
|
@ -41,11 +43,26 @@ SoundGrid* SoundGrid::_instance = 0;
|
|||
SoundGrid::SoundGrid ()
|
||||
: dl_handle (0)
|
||||
{
|
||||
cerr << "Loading " << sndgrid_dll_name << endl;
|
||||
if ((dl_handle = dlopen (sndgrid_dll_name, RTLD_NOW)) == 0) {
|
||||
const char *s = getenv ("SOUNDGRID_PATH");
|
||||
|
||||
if (!s) {
|
||||
cerr << "SOUNDGRID_PATH not defined - exiting\n";
|
||||
::exit (1);
|
||||
}
|
||||
|
||||
vector<string> p;
|
||||
p.push_back (s);
|
||||
p.push_back (sndgrid_dll_name);
|
||||
|
||||
string path = Glib::build_filename (p);
|
||||
|
||||
cerr << "Loading " << path << endl;
|
||||
|
||||
if ((dl_handle = dlopen (path.c_str(), RTLD_NOW)) == 0) {
|
||||
cerr << "...failed\n";
|
||||
return;
|
||||
}
|
||||
|
||||
cerr << "...worked\n";
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue