data dir added (for linux distros)
authordisplacer
Thu, 23 Nov 2006 18:54:18 +0000
changeset 261 21b03fe1cc28
parent 260 2208405af6c6
child 262 b4bc05237c06
data dir added (for linux distros)
CMakeLists.txt
QTfrontend/CMakeLists.txt
QTfrontend/main.cpp.in
--- 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)
--- 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 
--- 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();