26 lines
821 B
C++
26 lines
821 B
C++
|
|
// SPDX-License-Identifier: LGPL-3.0-only
|
||
|
|
// SPDX-FileCopyrightText: Copyright (C) 2026 Catcrafts®
|
||
|
|
|
||
|
|
import std;
|
||
|
|
import Crafter.Build;
|
||
|
|
using namespace Crafter;
|
||
|
|
|
||
|
|
// Makes its sibling's spec at namespace scope, so the spec's args default
|
||
|
|
// while LoadProject dlopens this file: before CrafterBuildProject is called,
|
||
|
|
// and on the first load of the file only.
|
||
|
|
namespace {
|
||
|
|
const LocalProjectSpec LeafSpec{ .projectFile = "../leaf/project.cpp" };
|
||
|
|
}
|
||
|
|
|
||
|
|
extern "C" Configuration CrafterBuildProject(std::span<const std::string_view> args) {
|
||
|
|
Configuration* leaf = LocalProject(LeafSpec);
|
||
|
|
|
||
|
|
Configuration cfg;
|
||
|
|
cfg.path = "./";
|
||
|
|
cfg.name = "static";
|
||
|
|
cfg.outputName = "static";
|
||
|
|
cfg.type = ConfigurationType::LibraryStatic;
|
||
|
|
ApplyStandardArgs(cfg, args);
|
||
|
|
cfg.dependencies = { leaf };
|
||
|
|
return cfg;
|
||
|
|
}
|