equal
deleted
inserted
replaced
40 # HACK: in freebsd cannot find iconv.h included via SDL.h |
40 # HACK: in freebsd cannot find iconv.h included via SDL.h |
41 include_directories("/usr/local/include") |
41 include_directories("/usr/local/include") |
42 endif(UNIX) |
42 endif(UNIX) |
43 |
43 |
44 #directory for resources, relative to bindir (on linux an absolute path is always used) |
44 #directory for resources, relative to bindir (on linux an absolute path is always used) |
45 string(FIND "${SHAREPATH}" "/" sharepath_is_absolute) |
45 string(SUBSTRING "${SHAREPATH}" 0 1 sharepath_start) |
46 if(APPLE OR WIN32 OR ${sharepath_is_absolute} EQUAL 0) |
46 if(APPLE OR WIN32 OR ${sharepath_start} MATCHES "/") |
47 set(HEDGEWARS_DATADIR ${SHAREPATH}) |
47 set(HEDGEWARS_DATADIR ${SHAREPATH}) |
48 else() |
48 else() |
49 set(HEDGEWARS_DATADIR ${CMAKE_INSTALL_PREFIX}/${SHAREPATH}) |
49 set(HEDGEWARS_DATADIR ${CMAKE_INSTALL_PREFIX}/${SHAREPATH}) |
50 endif() |
50 endif() |
51 |
51 |