Skip to content

Commit

Permalink
RMG-Core: use GNUInstallDirs paths
Browse files Browse the repository at this point in the history
  • Loading branch information
Rosalie241 committed Dec 18, 2023
1 parent 42e0c96 commit 10d47e5
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
4 changes: 3 additions & 1 deletion Source/RMG-Core/Config.hpp.in
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@
#define CORE_VERSION "${GIT_VERSION}"

#ifndef PORTABLE_INSTALL
#define CORE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}"
#define CORE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}"
#define CORE_INSTALL_LIBDIR "${CMAKE_INSTALL_LIBDIR}"
#define CORE_INSTALL_DATADIR "${CMAKE_INSTALL_DATADIR}"
#endif // PORTABLE_INSTALL

#endif // CORE_CONFIG_HPP
16 changes: 10 additions & 6 deletions Source/RMG-Core/Directories.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,9 @@ std::filesystem::path CoreGetLibraryDirectory(void)
else
{
directory = CORE_INSTALL_PREFIX;
directory += "/lib/RMG/";
directory += "/";
directory += CORE_INSTALL_LIBDIR;
directory += "/RMG/";
}
#endif // PORTABLE_INSTALL
return directory.make_preferred();
Expand All @@ -271,8 +273,8 @@ std::filesystem::path CoreGetCoreDirectory(void)
}
else
{
directory = CORE_INSTALL_PREFIX;
directory += "/lib/RMG/Core";
directory = CoreGetLibraryDirectory();
directory += "/Core";
}
#endif // CORE_INSTALL_PREFIX
return directory.make_preferred();
Expand All @@ -298,8 +300,8 @@ std::filesystem::path CoreGetPluginDirectory(void)
}
else
{
directory = CORE_INSTALL_PREFIX;
directory += "/lib/RMG/Plugin";
directory = CoreGetLibraryDirectory();
directory += "/Plugin";
}
#endif // CORE_INSTALL_PREFIX
return directory.make_preferred();
Expand Down Expand Up @@ -471,7 +473,9 @@ std::filesystem::path CoreGetSharedDataDirectory(void)
else
{
directory = CORE_INSTALL_PREFIX;
directory += "/share/RMG";
directory += "/";
directory += CORE_INSTALL_DATADIR;
directory += "/RMG";
}
#endif // PORTABLE_INSTALL
return directory.make_preferred();
Expand Down

0 comments on commit 10d47e5

Please sign in to comment.