2024-12-29 01:04:33 +01:00
|
|
|
/*
|
|
|
|
|
Crafter.Build
|
2024-12-30 17:21:04 +01:00
|
|
|
Copyright (C) 2024 Catcrafts
|
2024-12-31 20:32:00 +01:00
|
|
|
Catcrafts.net
|
2024-12-29 01:04:33 +01:00
|
|
|
|
|
|
|
|
This library is free software; you can redistribute it and/or
|
|
|
|
|
modify it under the terms of the GNU Lesser General Public
|
|
|
|
|
License as published by the Free Software Foundation; either
|
2024-12-31 20:32:00 +01:00
|
|
|
version 3.0 of the License, or (at your option) any later version.
|
2024-12-29 01:04:33 +01:00
|
|
|
|
|
|
|
|
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
|
2024-12-31 20:32:00 +01:00
|
|
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
2024-12-29 01:04:33 +01:00
|
|
|
*/
|
|
|
|
|
|
2024-12-28 21:00:12 +01:00
|
|
|
module;
|
|
|
|
|
#include <string>
|
|
|
|
|
#include <vector>
|
2024-12-29 17:53:46 +01:00
|
|
|
#include "json.hpp"
|
2024-12-30 13:48:49 +01:00
|
|
|
#include <unordered_map>
|
2024-12-28 21:00:12 +01:00
|
|
|
export module Crafter.Build:Configuration;
|
2024-12-29 17:53:46 +01:00
|
|
|
import :Dependency;
|
|
|
|
|
|
|
|
|
|
namespace fs = std::filesystem;
|
2024-12-28 21:00:12 +01:00
|
|
|
|
|
|
|
|
export namespace Crafter::Build {
|
|
|
|
|
class Configuration {
|
|
|
|
|
public:
|
|
|
|
|
std::string name;
|
|
|
|
|
std::string standard;
|
2024-12-29 17:53:46 +01:00
|
|
|
std::vector<fs::path> sourceFiles;
|
|
|
|
|
std::vector<fs::path> moduleFiles;
|
2025-01-02 02:53:39 +01:00
|
|
|
std::vector<fs::path> additionalFiles;
|
2024-12-28 21:00:12 +01:00
|
|
|
std::string optimizationLevel;
|
|
|
|
|
std::string buildDir;
|
|
|
|
|
std::string outputDir;
|
2024-12-29 01:38:25 +01:00
|
|
|
std::string type;
|
|
|
|
|
std::string target;
|
2024-12-29 17:53:46 +01:00
|
|
|
std::vector<Dependency> dependencies;
|
2024-12-30 13:48:49 +01:00
|
|
|
std::unordered_map<std::string, nlohmann::json> additionalProperties;
|
2025-01-02 02:53:39 +01:00
|
|
|
Configuration(std::string name, std::string standard, std::vector<fs::path> sourceFiles, std::vector<fs::path> moduleFiles, std::string optimizationLevel, std::string buildDir, std::string outputDir, std::string type, std::string target, std::vector<Dependency> dependencies, std::vector<fs::path> additionalFiles);
|
2024-12-30 20:18:23 +01:00
|
|
|
Configuration(const nlohmann::json& configs, const nlohmann::json& config, fs::path workingDir);
|
2024-12-28 21:00:12 +01:00
|
|
|
};
|
|
|
|
|
}
|