Skip to content

Commit

Permalink
Fix mac compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
codereader committed Dec 26, 2020
1 parent eac6cd2 commit c98020c
Show file tree
Hide file tree
Showing 4 changed files with 172 additions and 72 deletions.
6 changes: 4 additions & 2 deletions libs/module/ApplicationContextBase.cpp
Expand Up @@ -92,7 +92,9 @@ std::string ApplicationContextBase::getRuntimeDataPath() const

std::string ApplicationContextBase::getHTMLPath() const
{
#if defined(POSIX)
#if defined(__APPLE__)
return getRuntimeDataPath();
#elif defined(POSIX)
#if defined(ENABLE_RELOCATION)
return _appPath + "../share/doc/darkradiant/";
#elif defined(HTMLDIR)
Expand All @@ -101,7 +103,7 @@ std::string ApplicationContextBase::getHTMLPath() const
#error "Either HTMLDIR or ENABLE_RELOCATION must be defined"
#endif
#else
// TODO: implement correct path for macOS and Windows
// TODO: implement correct path for Windows
return getRuntimeDataPath();
#endif
}
Expand Down
3 changes: 3 additions & 0 deletions libs/os/fs.h
Expand Up @@ -41,6 +41,9 @@ namespace fs = std::experimental::filesystem::v1;

namespace fs = boost::filesystem;

// add a time type alias to be compatible with std::filesystem
namespace boost { namespace filesystem { typedef std::size_t file_time_type; } }

#endif

#include "string/predicate.h"
Expand Down

0 comments on commit c98020c

Please sign in to comment.