Now getting resource directory from cmake instead of hardcode; also enabled RESDIR for Release builds
This commit is contained in:
parent
2ee3f96340
commit
cf2ebd92a5
@ -20,3 +20,6 @@
|
||||
|
||||
#cmakedefine RESDIR_DEFINED
|
||||
#define RESDIR "${RESDIR}"
|
||||
|
||||
#define CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}"
|
||||
#define OPENSPADES_INSTALL_RESOURCES "${OPENSPADES_INSTALL_RESOURCES}"
|
||||
|
@ -389,12 +389,7 @@ int main(int argc, char ** argv)
|
||||
spades::FileManager::AddFileSystem
|
||||
(new spades::DirectoryFileSystem("./Resources", false));
|
||||
|
||||
spades::FileManager::AddFileSystem
|
||||
(new spades::DirectoryFileSystem("/usr/local/share/games/openspades/Resources", false));
|
||||
|
||||
spades::FileManager::AddFileSystem
|
||||
(new spades::DirectoryFileSystem("/usr/share/games/openspades/Resources", false));
|
||||
|
||||
spades::FileManager::AddFileSystem(new spades::DirectoryFileSystem(CMAKE_INSTALL_PREFIX "/" OPENSPADES_INSTALL_RESOURCES, false));
|
||||
|
||||
std::string xdg_data_home = home+"/.local/share";
|
||||
|
||||
@ -480,7 +475,7 @@ int main(int argc, char ** argv)
|
||||
}
|
||||
|
||||
// register resource directory specified by Makefile (or something)
|
||||
#if defined(RESDIR_DEFINED) && !NDEBUG
|
||||
#if defined(RESDIR_DEFINED)
|
||||
spades::FileManager::AddFileSystem(new spades::DirectoryFileSystem(RESDIR, false));
|
||||
#endif
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user