# HG changeset patch
# User displacer
# Date 1164308058 0
# Node ID 21b03fe1cc280a8cfdc9cc771573b35756ca7def
# Parent  2208405af6c63f2bca0dd8a4f19ddf7f92df695c
data dir added (for linux distros)

diff -r 2208405af6c6 -r 21b03fe1cc28 CMakeLists.txt
--- a/CMakeLists.txt	Tue Nov 21 17:44:02 2006 +0000
+++ b/CMakeLists.txt	Thu Nov 23 18:54:18 2006 +0000
@@ -2,7 +2,7 @@
 
 cmake_minimum_required(VERSION 2.4.0)
 
-set(SHAREPATH share/hedgewars/)
+set(SHAREPATH ${DATA_INSTALL_DIR}/hedgewars/)
 set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
 
 add_subdirectory(bin)
diff -r 2208405af6c6 -r 21b03fe1cc28 QTfrontend/CMakeLists.txt
--- a/QTfrontend/CMakeLists.txt	Tue Nov 21 17:44:02 2006 +0000
+++ b/QTfrontend/CMakeLists.txt	Thu Nov 23 18:54:18 2006 +0000
@@ -8,6 +8,7 @@
 	set(HEDGEWARS_BINDIR ".")
 else(WIN32 AND NOT UNIX)
 	set(HEDGEWARS_BINDIR ${CMAKE_INSTALL_PREFIX})
+	set(HEDGEWARS_DATADIR ${DATA_INSTALL_DIR})
 endif(WIN32 AND NOT UNIX)
 
 configure_file(${hedgewars_SOURCE_DIR}/QTfrontend/main.cpp.in 
diff -r 2208405af6c6 -r 21b03fe1cc28 QTfrontend/main.cpp.in
--- a/QTfrontend/main.cpp.in	Tue Nov 21 17:44:02 2006 +0000
+++ b/QTfrontend/main.cpp.in	Thu Nov 23 18:54:18 2006 +0000
@@ -71,8 +71,8 @@
 	}
 	cfgdir->cd(".hedgewars");
 
-	datadir = new QDir(mydir);
-	datadir->cd("../share/hedgewars/Data");
+	datadir = new QDir("${HEDGEWARS_DATADIR}");
+	datadir->cd("hedgewars/Data");
 
 	HWForm *Form = new HWForm();
 	Form->show();