From: Julian Ospald <julian.ospald@googlemail.com>
Date: Tue Apr  3 03:33:30 UTC 2012

make install-paths modifiable
prepend "CMAKE_INSTALL_PREFIX" to SHAREDIR for proper variable substitution

--- CMakeLists.txt
+++ CMakeLists.txt
@@ -73,14 +73,14 @@
 		set(ICONDIR "unix/icons")
 		set(LOCALEDIR "locale")
 	else()
-		set(SHAREDIR "share/${PROJECT_NAME}")
-		set(BINDIR "bin")
-		set(DOCDIR "share/doc/${PROJECT_NAME}")
-		set(MANDIR "share/man")
-		set(EXAMPLE_CONF_DIR ${DOCDIR})
-		set(XDG_APPS_DIR "share/applications")
-		set(ICONDIR "share/icons")
-		set(LOCALEDIR "share/locale")
+		set(SHAREDIR "${CMAKE_INSTALL_PREFIX}/share/${PROJECT_NAME}" CACHE PATH "")
+		set(BINDIR "bin" CACHE PATH "")
+		set(DOCDIR "share/doc/${PROJECT_NAME}" CACHE PATH "")
+		set(MANDIR "share/man" CACHE PATH "")
+		set(EXAMPLE_CONF_DIR ${DOCDIR} CACHE PATH "")
+		set(XDG_APPS_DIR "share/applications" CACHE PATH "")
+		set(ICONDIR "share/icons" CACHE PATH "")
+		set(LOCALEDIR "share/locale" CACHE PATH "")
 	endif()
 endif()