import std; import Crafter.Build; namespace fs = std::filesystem; using namespace Crafter; extern "C" Configuration CrafterBuildProject(std::span) { static auto ShaderLib = std::make_unique(); ShaderLib->path = "./lib/"; ShaderLib->name = "ShaderLib"; ShaderLib->outputName = "ShaderLib"; ShaderLib->target = "x86_64-pc-linux-gnu"; ShaderLib->type = ConfigurationType::LibraryStatic; { std::array ifaces = { "ShaderLib" }; std::array impls = {}; ShaderLib->GetInterfacesAndImplementations(ifaces, impls); } ShaderLib->shaders.emplace_back("./lib/triangle.glsl", "main", ShaderType::Vertex); Configuration app; app.path = "./"; app.name = "shader-dep-app"; app.outputName = "shader-dep-app"; app.target = "x86_64-pc-linux-gnu"; app.type = ConfigurationType::Executable; app.dependencies = { ShaderLib.get() }; { std::array ifaces = {}; std::array impls = { "main" }; app.GetInterfacesAndImplementations(ifaces, impls); } return app; }