cmake_modules/paths.cmake
changeset 10069 c4ad9c76b542
parent 9950 2759212a27de
child 10911 5e3f42553ebc
--- a/cmake_modules/paths.cmake	Fri Jan 24 10:56:22 2014 +0100
+++ b/cmake_modules/paths.cmake	Fri Jan 24 11:11:39 2014 +0100
@@ -18,10 +18,10 @@
     set(target_library_install_dir "lib" CACHE PATH "install dest for libs")
 
     string(SUBSTRING "${DATA_INSTALL_DIR}" 0 1 sharepath_start)
-    if (NOT (${sharepath_start} MATCHES "/"))
+    if(${sharepath_start} MATCHES "/")
+        set(HEDGEWARS_DATADIR "${DATA_INSTALL_DIR}/")
+    else()
         set(HEDGEWARS_DATADIR "${CMAKE_INSTALL_PREFIX}/${DATA_INSTALL_DIR}/")
-    else()
-        set(HEDGEWARS_DATADIR "${DATA_INSTALL_DIR}/")
     endif()
     set(HEDGEWARS_FULL_DATADIR "${HEDGEWARS_DATADIR}")
 else()