From cddf04479f5d3c8f44b4bf6f5569c6201614aa99 Mon Sep 17 00:00:00 2001 From: Josh Morgenstern <josh@morgenstern.dev> Date: Mon, 21 Jun 2021 15:34:14 +0200 Subject: [PATCH] [#83] add Utils.cpp --- src/vkcv/Utils.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 src/vkcv/Utils.cpp diff --git a/src/vkcv/Utils.cpp b/src/vkcv/Utils.cpp new file mode 100644 index 00000000..301cd1f0 --- /dev/null +++ b/src/vkcv/Utils.cpp @@ -0,0 +1,12 @@ +#include <vkcv/Utils.hpp> +#include <boost/dll.hpp> + +namespace utils { + + std::string absolutePath(std::string path) { + boost::filesystem::path root = boost::dll::program_location().parent_path(); + boost::filesystem::path relative(path); + boost::filesystem::path fullpath = root / relative; + return fullpath.string(); + } +} \ No newline at end of file -- GitLab