CMakeLists.txt
changeset 8087 ccc99eebdac2
parent 8082 675372256a01
child 8088 55f99b65e795
--- a/CMakeLists.txt	Wed Nov 21 11:26:30 2012 +0100
+++ b/CMakeLists.txt	Wed Nov 21 12:03:40 2012 +0100
@@ -1,14 +1,13 @@
 project(hedgewars)
 
-
 #initialise cmake environment
 cmake_minimum_required(VERSION 2.6.0 FATAL_ERROR)
-FOREACH(policy CMP0003 CMP0012)
-    IF(POLICY ${policy})
-        CMAKE_POLICY(SET ${policy} NEW)
-    ENDIF()
+cmake_policy(VERSION 2.6)
+FOREACH(hwpolicy CMP0003 CMP0012 CMP0017)
+    CMAKE_POLICY(SET ${hwpolicy} NEW)
 ENDFOREACH()
-set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules)
+#use available modules, fallback to ours if not present (CMP0017 helps)
+set(CMAKE_MODULE_PATH "${CMAKE_ROOT}/Modules" "${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules")
 
 
 #detect Mercurial revision (if present)