summaryrefslogtreecommitdiff
path: root/libadhocutil/definedDirs.h
blob: b24a1c91cd9053e6d847654a179b0bb7fcd29843 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#ifndef ADHOCUTIL_DEFINEDDIRS_H
#define ADHOCUTIL_DEFINEDDIRS_H

#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 selfExe = boost::filesystem::canonical("/proc/self/exe");
const auto binDir = selfExe.parent_path();
const boost::filesystem::path rootDir(XSTR(ROOT));

#endif