Let cmake use absolute locale dirs.

This patch doesn't change the behaviour on Windows.
(Applies patch #2280).
This commit is contained in:
Mark de Wever 2011-02-17 20:57:45 +00:00
parent aa723cd7b1
commit 1f91733b39
2 changed files with 12 additions and 2 deletions

View file

@ -151,9 +151,17 @@ if(X11_FOUND)
add_definitions(-D_X11)
endif(X11_FOUND)
add_definitions(-DHAS_RELATIVE_LOCALEDIR=1)
add_definitions(-DLOCALEDIR=\\\"${LOCALEDIR}\\\")
set(LOCALE_INSTALL ${DATADIR}/${LOCALEDIR})
# When the path starts with a / on a Unix system it's an absolute path.
# This means that on Windows the path used is always relative.
if(LOCALEDIR MATCHES "^/")
add_definitions(-DHAS_RELATIVE_LOCALEDIR=0)
set(LOCALE_INSTALL ${LOCALEDIR})
else(LOCALEDIR MATCHES "^/")
add_definitions(-DHAS_RELATIVE_LOCALEDIR=1)
set(LOCALE_INSTALL ${DATADIR}/${LOCALEDIR})
endif(LOCALEDIR MATCHES "^/")
add_definitions(-DFIFODIR=\\\"${FIFO_DIR}\\\")

View file

@ -31,6 +31,8 @@ Version 1.9.4+svn:
--smallgui anymore.
* Reverted hotkey for clearing cache for Mac OS X back to F5. Control-F5
still works (and is necessary when in windowed mode).
* Let cmake use absolute locale dirs when set to an absolute path.
(Windows always uses a relative path.) (patch #2280)
Version 1.9.4:
* AI: