// SPDX-License-Identifier: LGPL-3.0-only // SPDX-FileCopyrightText: Copyright (C) 2026 Catcrafts® import std; import Crafter.Build; #pragma crafter dependency "../greeter" import Greeter; using namespace Crafter; extern "C" Configuration CrafterBuildProject(std::span) { Configuration cfg; cfg.path = "./"; cfg.name = Greet(); cfg.outputName = "app"; cfg.type = ConfigurationType::Executable; // Once by the module it exports, once by its configuration name; the // test expects the same object back for both. cfg.dependencies = { ProjectDependency("Greeter"), ProjectDependency("greeter") }; // Reported through a flag the test can read back: this file is the one // LoadProject was pointed at, the greeter's is not. cfg.compileFlags.push_back(IsTopLevelProject() ? "-DTOP_LEVEL=1" : "-DTOP_LEVEL=0"); return cfg; }