Crafter.Build/tests/HostToolingSibling/fixture/tool/project.cpp

24 lines
825 B
C++
Raw Normal View History

// 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 app's `#pragma crafter dependency`, with a sibling of its own.
extern "C" Configuration CrafterBuildProject(std::span<const std::string_view> args) {
Configuration* shared = LocalProject({ .projectFile = "../shared/project.cpp" });
Configuration cfg;
cfg.path = "./";
cfg.name = "tool";
cfg.outputName = "tool";
cfg.type = ConfigurationType::LibraryStatic;
ApplyStandardArgs(cfg, args);
cfg.dependencies = { shared };
std::array<fs::path, 1> ifaces = { "interfaces/Tool" };
std::array<fs::path, 0> impls = {};
cfg.GetInterfacesAndImplementations(ifaces, impls);
return cfg;
}