Fix using proper engine native module for importing symbols
This commit is contained in:
@@ -16,9 +16,20 @@ public class Scripting : EngineModule
|
||||
if (EngineConfiguration.WithCSharp(options))
|
||||
{
|
||||
if (EngineConfiguration.WithDotNet(options))
|
||||
{
|
||||
options.PublicDependencies.Add("nethost");
|
||||
|
||||
if (options.Target is EngineTarget engineTarget && engineTarget.UseSeparateMainExecutable(options))
|
||||
{
|
||||
// Build target doesn't support linking again main executable (eg. Linux) thus additional shared library is used for the engine (eg. libFlaxEditor.so)
|
||||
var fileName = options.Platform.GetLinkOutputFileName(engineTarget.OutputName, LinkerOutput.SharedLibrary);
|
||||
options.CompileEnv.PreprocessorDefinitions.Add("MCORE_MAIN_MODULE_NAME=" + fileName);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
options.PublicDependencies.Add("mono");
|
||||
}
|
||||
}
|
||||
|
||||
options.PrivateDependencies.Add("Utilities");
|
||||
|
||||
Reference in New Issue
Block a user