restore compatibility with cmake 2.6
authorkoda
Fri, 28 Dec 2012 11:00:12 +0100
changeset 8342 44d65d9bfda4
parent 8341 7a7a39b2449b
child 8343 aa4ea3cade3c
child 8344 3d18f7f71d65
restore compatibility with cmake 2.6
QTfrontend/CMakeLists.txt
--- a/QTfrontend/CMakeLists.txt	Thu Dec 27 18:16:50 2012 +0100
+++ b/QTfrontend/CMakeLists.txt	Fri Dec 28 11:00:12 2012 +0100
@@ -42,8 +42,8 @@
 endif(UNIX)
 
 #directory for resources, relative to bindir (on linux an absolute path is always used)
-string(FIND "${SHAREPATH}" "/" sharepath_is_absolute)
-if(APPLE OR WIN32 OR ${sharepath_is_absolute} EQUAL 0)
+string(SUBSTRING "${SHAREPATH}" 0 1 sharepath_start)
+if(APPLE OR WIN32 OR ${sharepath_start} MATCHES "/")
     set(HEDGEWARS_DATADIR ${SHAREPATH})
 else()
     set(HEDGEWARS_DATADIR ${CMAKE_INSTALL_PREFIX}/${SHAREPATH})