void LibraryModule::findAndAddCompiledCode (ProjectExporter& exporter, ProjectSaver& projectSaver, const File& localModuleFolder, Array<File>& result) const { const var compileArray (moduleInfo.moduleInfo ["compile"]); // careful to keep this alive while the array is in use! if (const Array<var>* const files = compileArray.getArray()) { for (int i = 0; i < files->size(); ++i) { const var& file = files->getReference(i); const String filename (file ["file"].toString()); if (filename.isNotEmpty() && fileTargetMatches (exporter, file ["target"].toString())) { const File compiledFile (localModuleFolder.getChildFile (filename)); result.add (compiledFile); Project::Item item (projectSaver.addFileToGeneratedGroup (compiledFile)); if (file ["warnings"].toString().equalsIgnoreCase ("disabled")) item.getShouldInhibitWarningsValue() = true; if (file ["stdcall"]) item.getShouldUseStdCallValue() = true; } } } }
static bool fileShouldBeAdded (ProjectExporter& exporter, const var& properties) { if (! fileTargetMatches (exporter, properties["target"].toString())) return false; if (properties["RTASOnly"] && ! shouldBuildRTAS (exporter.getProject()).getValue()) return false; if (properties["AudioUnitOnly"] && ! shouldBuildAU (exporter.getProject()).getValue()) return false; return true; }