Fix so that project builds dependencies

Currently there is a problem where the h files in the makefile are in
absolute path. This makes it so that the Makefile cannot be shared
between different computers.
This commit is contained in:
Thraix
2019-06-16 11:48:08 +02:00
parent 3425daa792
commit 313ec9b770
10 changed files with 193 additions and 96 deletions
+14
View File
@@ -6,9 +6,23 @@
#include "Common.h"
#include <cstring>
#include <vector>
#include <stdlib.h>
struct FileUtils
{
static std::string GetRealPath(const std::string& filename)
{
#if defined(__linux__)
char* path = realpath(filename.c_str(), NULL);
std::string sPath = path;
sPath+="/";
free(path);
return sPath;
#endif
LOG_ERROR("GetRealPath not supported");
return filename;
}
static void GetAllFiles(const std::string& folder, std::vector<std::string>& files)
{
DIR* dp;