the global config path is not always $prefix/etc, so just define the whole path in the build system

deque
Sebastian Wick 10 years ago
parent f46da271d7
commit 41094a8641

@ -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…
Cancel
Save