23 lines
855 B
C++
23 lines
855 B
C++
|
|
// SPDX-License-Identifier: LGPL-3.0-only
|
||
|
|
// SPDX-FileCopyrightText: Copyright (C) 2026 Catcrafts®
|
||
|
|
|
||
|
|
import std;
|
||
|
|
import Crafter.Build;
|
||
|
|
namespace fs = std::filesystem;
|
||
|
|
using namespace Crafter;
|
||
|
|
|
||
|
|
// The sibling project the consumer's project.cpp imports a module from.
|
||
|
|
// ApplyStandardArgs on purpose: it reads CRAFTER_BUILD_MARCH from the
|
||
|
|
// environment, and the pre-pass has to override whatever it picked.
|
||
|
|
extern "C" Configuration CrafterBuildProject(std::span<const std::string_view> args) {
|
||
|
|
Configuration cfg;
|
||
|
|
cfg.path = "./";
|
||
|
|
cfg.name = "greeter";
|
||
|
|
cfg.outputName = "greeter";
|
||
|
|
cfg.type = ConfigurationType::LibraryStatic;
|
||
|
|
ApplyStandardArgs(cfg, args);
|
||
|
|
std::array<fs::path, 1> ifaces = { "interfaces/Greeter" };
|
||
|
|
std::array<fs::path, 0> impls = {};
|
||
|
|
cfg.GetInterfacesAndImplementations(ifaces, impls);
|
||
|
|
return cfg;
|
||
|
|
}
|