summaryrefslogtreecommitdiff
path: root/libadhocutil/definedDirs.h
diff options
context:
space:
mode:
Diffstat (limited to 'libadhocutil/definedDirs.h')
-rw-r--r--libadhocutil/definedDirs.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/libadhocutil/definedDirs.h b/libadhocutil/definedDirs.h
new file mode 100644
index 0000000..cbed012
--- /dev/null
+++ b/libadhocutil/definedDirs.h
@@ -0,0 +1,17 @@
+#ifndef P2_UT_DEFINEDDIRS
+#define P2_UT_DEFINEDDIRS
+
+#include <boost/filesystem/path.hpp>
+#include <boost/filesystem/convenience.hpp>
+
+#ifndef ROOT
+#error "ROOT needs to be defined at compilation time"
+#endif
+
+#define XSTR(s) STR(s)
+#define STR(s) #s
+const auto BinDir = boost::filesystem::canonical("/proc/self/exe").parent_path();
+const boost::filesystem::path RootDir(XSTR(ROOT));
+
+#endif
+