diff --git a/src/Generator/Generators/QuickJS/QuickJSGenerator.cs b/src/Generator/Generators/QuickJS/QuickJSGenerator.cs index e757a339..8462b6b6 100644 --- a/src/Generator/Generators/QuickJS/QuickJSGenerator.cs +++ b/src/Generator/Generators/QuickJS/QuickJSGenerator.cs @@ -12,6 +12,16 @@ namespace CppSharp.Generators.C { public QuickJSGenerator(BindingContext context) : base(context) { + if (context.Options.GenerateName == null) + { + context.Options.GenerateName = (unit) => + { + if (unit.FileName == "premake5.lua") + return unit.FileNameWithoutExtension; + else + return $"{unit.Module.LibraryName}_JS_{unit.FileNameWithoutExtension}"; + }; + } } public override List Generate() @@ -65,7 +75,7 @@ namespace CppSharp.Generators.C { TranslationUnit = new TranslationUnit { - FilePath = $"{module.LibraryName}_qjs_module.cpp", + FilePath = $"QJSModule.cpp", Module = module }, Outputs = new List { moduleGen }