mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-29 21:45:32 +00:00
the global config path is not always $prefix/etc, so just define the whole path in the build system
This commit is contained in:
parent
f46da271d7
commit
41094a8641
2 changed files with 8 additions and 3 deletions
|
@ -57,7 +57,12 @@ add_component_dir (misc
|
|||
utf8stream stringops resourcehelpers
|
||||
)
|
||||
|
||||
add_definitions(-DINSTALL_PREFIX="${CMAKE_INSTALL_PREFIX}")
|
||||
add_definitions(-DGLOBAL_DATA_PATH="${CMAKE_INSTALL_PREFIX}/share/games/")
|
||||
if("${CMAKE_INSTALL_PREFIX}" STREQUAL "/usr")
|
||||
add_definitions(-DGLOBAL_CONFIG_PATH="/etc/")
|
||||
else()
|
||||
add_definitions(-DGLOBAL_CONFIG_PATH="${CMAKE_INSTALL_PREFIX}/etc/")
|
||||
endif()
|
||||
add_component_dir (files
|
||||
linuxpath androidpath windowspath macospath fixedpath multidircollection collections configurationmanager
|
||||
constrainedfiledatastream lowlevelfile
|
||||
|
|
|
@ -69,7 +69,7 @@ boost::filesystem::path LinuxPath::getCachePath() const
|
|||
|
||||
boost::filesystem::path LinuxPath::getGlobalConfigPath() const
|
||||
{
|
||||
boost::filesystem::path globalPath(INSTALL_PREFIX "/etc/");
|
||||
boost::filesystem::path globalPath(GLOBAL_CONFIG_PATH);
|
||||
return globalPath / mName;
|
||||
}
|
||||
|
||||
|
@ -80,7 +80,7 @@ boost::filesystem::path LinuxPath::getLocalPath() const
|
|||
|
||||
boost::filesystem::path LinuxPath::getGlobalDataPath() const
|
||||
{
|
||||
boost::filesystem::path globalDataPath(INSTALL_PREFIX "/share/games/");
|
||||
boost::filesystem::path globalDataPath(GLOBAL_DATA_PATH);
|
||||
return globalDataPath / mName;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue