fixed absent DATA_INSTALL_DIR
authordisplacer
Thu, 23 Nov 2006 19:48:39 +0000
changeset 262 b4bc05237c06
parent 261 21b03fe1cc28
child 263 36379e6abcdd
fixed absent DATA_INSTALL_DIR
CMakeLists.txt
--- a/CMakeLists.txt	Thu Nov 23 18:54:18 2006 +0000
+++ b/CMakeLists.txt	Thu Nov 23 19:48:39 2006 +0000
@@ -2,7 +2,11 @@
 
 cmake_minimum_required(VERSION 2.4.0)
 
-set(SHAREPATH ${DATA_INSTALL_DIR}/hedgewars/)
+if(EXISTS ${DATA_INSTALL_DIR})
+	set(SHAREPATH ${DATA_INSTALL_DIR}/hedgewars/)
+else(EXISTS ${DATA_INSTALL_DIR})
+	set(SHAREPATH share/hedgewars/)
+endif(EXISTS ${DATA_INSTALL_DIR})
 set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
 
 add_subdirectory(bin)