@@ -99,6 +99,18 @@ namespace Flax.Build.Platforms
|
||||
//args.Add(string.Format("-Wl,-soname=\"{0}\"", soname));
|
||||
}
|
||||
|
||||
// Include any external folders into rpath for proper dlopen (eg. when opening Editor project with plugins)
|
||||
if (options.LinkEnv.Output == LinkerOutput.SharedLibrary || options.LinkEnv.Output == LinkerOutput.Executable)
|
||||
{
|
||||
var originDir = Path.GetDirectoryName(outputFilePath);
|
||||
foreach (var lib in options.LinkEnv.InputLibraries)
|
||||
{
|
||||
var libDir = Path.GetDirectoryName(lib);
|
||||
if (libDir != originDir)
|
||||
args.Add($"-Wl,-rpath,\"{libDir}\"");
|
||||
}
|
||||
}
|
||||
|
||||
args.Add(string.Format("-target {0}", ArchitectureName));
|
||||
args.Add(string.Format("--sysroot=\"{0}\"", ToolsetRoot.Replace('\\', '/')));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user