SYSCONFDIR and LinuxPath should work with different install prefixs

deque
Sebastian Wick 10 years ago
parent 144f6ca79a
commit 2ae8158ee9

@ -401,7 +401,7 @@ IF(NOT WIN32 AND NOT APPLE)
SET(DATADIR "${DATAROOTDIR}/games/openmw" CACHE PATH "Sets the openmw data directories to a non-default location")
SET(ICONDIR "${DATAROOTDIR}/pixmaps" CACHE PATH "Set icon dir")
SET(LICDIR "${DATAROOTDIR}/licenses/openmw" CACHE PATH "Sets the openmw license directory to a non-default location.")
SET(SYSCONFDIR "/etc/openmw" CACHE PATH "Set config dir")
SET(SYSCONFDIR "${CMAKE_INSTALL_PREFIX}/etc/openmw" CACHE PATH "Set config dir")
# Install binaries
INSTALL(PROGRAMS "${OpenMW_BINARY_DIR}/openmw" DESTINATION "${BINDIR}" )

@ -57,6 +57,7 @@ add_component_dir (misc
utf8stream stringops resourcehelpers
)
add_definitions(-DINSTALL_PREFIX="${CMAKE_INSTALL_PREFIX}")
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("/etc/");
boost::filesystem::path globalPath(INSTALL_PREFIX "/etc/");
return globalPath / mName;
}
@ -80,7 +80,7 @@ boost::filesystem::path LinuxPath::getLocalPath() const
boost::filesystem::path LinuxPath::getGlobalDataPath() const
{
boost::filesystem::path globalDataPath("/usr/share/games/");
boost::filesystem::path globalDataPath(INSTALL_PREFIX "/share/games/");
return globalDataPath / mName;
}

Loading…
Cancel
Save