Add Debian 12 C++23 toolchain, plumb args
This commit is contained in:
parent
aea51d9e77
commit
e1af823502
4 changed files with 41 additions and 2 deletions
6
.vscode/settings.json
vendored
Normal file
6
.vscode/settings.json
vendored
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
// Use this only if you're on debian.
|
||||||
|
"cmake.configureArgs": [
|
||||||
|
"-DCMAKE_TOOLCHAIN_FILE=CMake/debian-toolchain.cmake"
|
||||||
|
]
|
||||||
|
}
|
7
CMake/debian-toolchain.cmake
Normal file
7
CMake/debian-toolchain.cmake
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
find_program(CMAKE_C_COMPILER clang)
|
||||||
|
find_program(CMAKE_CXX_COMPILER clang++)
|
||||||
|
|
||||||
|
set(CMAKE_C_COMPILER "${CMAKE_C_COMPILER}" CACHE STRING "C compiler" FORCE)
|
||||||
|
set(CMAKE_CXX_COMPILER "${CMAKE_CXX_COMPILER}" CACHE STRING "C++ compiler" FORCE)
|
||||||
|
|
||||||
|
set(CMAKE_CXX_FLAGS "-stdlib=libc++ -fexperimental-library")
|
|
@ -1,9 +1,20 @@
|
||||||
#include "Kanimaji/Kanimaji.hpp"
|
#include "Kanimaji/Kanimaji.hpp"
|
||||||
|
|
||||||
|
#include <ctre.hpp>
|
||||||
|
#include <pugixml.hpp>
|
||||||
|
|
||||||
namespace Kanimaji
|
namespace Kanimaji
|
||||||
{
|
{
|
||||||
bool Animate(const std::string& source, const std::string& destination)
|
bool Animate(const std::string& source, const std::string& destination)
|
||||||
{
|
{
|
||||||
|
pugi::xml_document doc;
|
||||||
|
pugi::xml_parse_result res = doc.load_file(source.c_str());
|
||||||
|
if (!res) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,21 @@
|
||||||
#include <Kanimaji/Kanimaji.hpp>
|
#include <Kanimaji/Kanimaji.hpp>
|
||||||
|
|
||||||
int main()
|
#include <print>
|
||||||
{
|
|
||||||
|
|
||||||
|
int main(const int argc, const char *argv[])
|
||||||
|
{
|
||||||
|
if (argc != 3) {
|
||||||
|
std::println("Usage: KanimajiTool SOURCE DESTINATION\n\n"
|
||||||
|
"SOURCE - Path to a file from the KanjiVG dataset.\n"
|
||||||
|
"DESTINATION - Path to write the animated SVG.\n"
|
||||||
|
);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!Kanimaji::Animate(argv[1], argv[2])) {
|
||||||
|
std::println("Could not animate the specified file.");
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue