import std; import Crafter.Build; namespace fs = std::filesystem; using namespace Crafter; extern "C" Configuration CrafterBuildProject(std::span args) { GitProjectSpec mathSpec{ .source = { .url = "https://forgejo.catcrafts.net/Catcrafts/Crafter.Math.git" }, .args = std::vector(args.begin(), args.end()), }; Configuration* math = GitProject(mathSpec); Configuration cfg; cfg.path = "./"; cfg.name = "Crafter.Asset"; ApplyStandardArgs(cfg, args); cfg.outputName = (cfg.type == ConfigurationType::Executable) ? "crafter-asset" : "Crafter.Asset"; cfg.dependencies = { math }; std::array ifaces = { "interfaces/Crafter.Asset", "interfaces/Crafter.Asset-Texture", "interfaces/Crafter.Asset-Mesh", }; if (cfg.type == ConfigurationType::Executable) { std::array impls = { "implementations/main" }; cfg.GetInterfacesAndImplementations(ifaces, impls); } else { std::array impls = {}; cfg.GetInterfacesAndImplementations(ifaces, impls); } return cfg; }