From bde4a9f40bb4af39270a124d5ef9571a83305d0a Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sat, 30 Jan 2021 20:36:42 +0000 Subject: Restructure to allow a resource path and testing --- lib/resource.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 lib/resource.h (limited to 'lib/resource.h') diff --git a/lib/resource.h b/lib/resource.h new file mode 100644 index 0000000..958c49d --- /dev/null +++ b/lib/resource.h @@ -0,0 +1,23 @@ +#ifndef RESOURCE_H +#define RESOURCE_H + +#include + +class Resource { +public: + static void setBasePath(std::filesystem::path); + static std::filesystem::path mapPath(const std::filesystem::path &); +}; + +#if defined(RESDIR) && defined(BOOST_TEST_MODULE) +class SetResourcePath { +public: + SetResourcePath() + { + Resource::setBasePath(RESDIR); + } +}; +BOOST_GLOBAL_FIXTURE(SetResourcePath); +#endif + +#endif -- cgit v1.2.3