/* Crafter® Build Copyright (C) 2026 Catcrafts® Catcrafts.net This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License version 3.0 as published by the Free Software Foundation; This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ module; #include "Crafter.Build-Api.h" export module Crafter.Build:External; import std; namespace fs = std::filesystem; export namespace Crafter { struct GitSource { std::string url; std::string branch; std::string commit; }; enum class ExternalBuilder { None, CMake, }; struct ExternalDependency { std::string name; GitSource source; ExternalBuilder builder = ExternalBuilder::None; std::vector options; std::vector includeDirs; std::vector libs; }; struct ExternalBuildResult { std::string error; std::vector compileFlags; std::vector linkFlags; fs::file_time_type latestArtifact = fs::file_time_type::min(); }; CRAFTER_API ExternalBuildResult BuildExternal( const ExternalDependency& dep, std::string_view target, std::atomic& cancelled); }