QTfrontend/CMakeLists.txt
changeset 8342 44d65d9bfda4
parent 8335 bc948db1273a
child 8347 716c05f19401
--- 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})