diff --git a/nall/GNUmakefile b/nall/GNUmakefile index c3df28386..dcca2b6dd 100755 --- a/nall/GNUmakefile +++ b/nall/GNUmakefile @@ -243,4 +243,5 @@ else bindir ?= $(prefix)/bin datarootdir ?= $(prefix)/share datadir ?= $(datarootdir) + flags += -DDATADIR=\"$(datadir)\" endif diff --git a/nall/path.hpp b/nall/path.hpp index 3353817b4..a9f0b496c 100644 --- a/nall/path.hpp +++ b/nall/path.hpp @@ -137,6 +137,8 @@ inline auto sharedData() -> string { result.transform("\\", "/"); #elif defined(PLATFORM_MACOS) string result = "/Library/Application Support/"; + #elif defined(DATADIR) + string result = DATADIR; #else string result = "/usr/share/"; #endif