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

23 lines
852 B
C++
Raw Permalink 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 sibling both the tool and the app load. ApplyStandardArgs on purpose:
// it reads CRAFTER_BUILD_MARCH from the environment, which is how the test
// tells the app's copy from the one built as host tooling.
extern "C" Configuration CrafterBuildProject(std::span<const std::string_view> args) {
Configuration cfg;
cfg.path = "./";
cfg.name = "shared";
cfg.outputName = "shared";
cfg.type = ConfigurationType::LibraryStatic;
ApplyStandardArgs(cfg, args);
std::array<fs::path, 1> ifaces = { "interfaces/Shared" };
std::array<fs::path, 0> impls = {};
cfg.GetInterfacesAndImplementations(ifaces, impls);
return cfg;
}