Update kmake/src/Exporters/MacOSExporter.ts
This commit is contained in:
@ -32,21 +32,25 @@ export class MacOSExporter extends Exporter {
|
||||
outputExtension = '.dylib';
|
||||
}
|
||||
|
||||
const macLibsLine = (project: Project): string => {
|
||||
let libs = '';
|
||||
for (let lib of project.getLibs()) {
|
||||
if (['OpenGL', 'Cocoa', 'IOKit', 'AppKit', 'CoreAudio', 'CoreData', 'CoreMedia', 'CoreVideo', 'AVFoundation', 'Foundation', 'Metal', 'MetalKit'].includes(lib)) {
|
||||
libs += ' -framework ' + lib;
|
||||
} else {
|
||||
libs += ' -l' + lib;
|
||||
}
|
||||
}
|
||||
return libs;
|
||||
};
|
||||
|
||||
this.ninja = new NinjaExporter(options, this.getCCompiler(), this.getCPPCompiler(), '', '', linkerFlags, outputExtension);
|
||||
this.make = new MakeExporter(options, this.getCCompiler(), this.getCPPCompiler(), '', '', linkerFlags, outputExtension);
|
||||
this.make = new MakeExporter(options, this.getCCompiler(), this.getCPPCompiler(), '', '', linkerFlags, outputExtension, macLibsLine);
|
||||
this.clion = new CLionExporter(options);
|
||||
this.compileCommands = new CompilerCommandsExporter(options);
|
||||
}
|
||||
|
||||
async exportSolution(project: Project, from: string, to: string, platform: string, vrApi: any, options: any) {
|
||||
// Debug: log .m files before export
|
||||
console.log('MacOSExporter: Total files:', project.getFiles().length);
|
||||
for (let fileobject of project.getFiles()) {
|
||||
if (fileobject.file.endsWith('.m') || fileobject.file.endsWith('.mm')) {
|
||||
console.log('MacOSExporter: Found .m file:', fileobject.file);
|
||||
}
|
||||
}
|
||||
|
||||
this.ninja.exportSolution(project, from, to, platform, vrApi, options);
|
||||
this.make.exportSolution(project, from, to, platform, vrApi, options);
|
||||
this.clion.exportSolution(project, from, to, platform, vrApi, options);
|
||||
|
||||
Reference in New Issue
Block a user