24 lines
792 B
C++
24 lines
792 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;
|
||
|
|
|
||
|
|
// Loads M with the default, so M gets whatever A was given.
|
||
|
|
extern "C" Configuration CrafterBuildProject(std::span<const std::string_view> args) {
|
||
|
|
Configuration* m = LocalProject({ .projectFile = "../m/project.cpp" });
|
||
|
|
|
||
|
|
Configuration cfg;
|
||
|
|
cfg.path = "./";
|
||
|
|
cfg.name = "A";
|
||
|
|
cfg.outputName = "A";
|
||
|
|
cfg.type = ConfigurationType::LibraryStatic;
|
||
|
|
ApplyStandardArgs(cfg, args);
|
||
|
|
cfg.dependencies = { m };
|
||
|
|
std::array<fs::path, 1> ifaces = { "interfaces/A" };
|
||
|
|
std::array<fs::path, 0> impls = {};
|
||
|
|
cfg.GetInterfacesAndImplementations(ifaces, impls);
|
||
|
|
return cfg;
|
||
|
|
}
|