[geos-commits] r2901 - trunk

svn_geos at osgeo.org svn_geos at osgeo.org
Tue Feb 2 13:14:44 EST 2010


Author: mloskot
Date: 2010-02-02 13:14:43 -0500 (Tue, 02 Feb 2010)
New Revision: 2901

Modified:
   trunk/CMakeLists.txt
Log:
Fixed problem with use of new command with file() macro for older CMake versions (#327)

Modified: trunk/CMakeLists.txt
===================================================================
--- trunk/CMakeLists.txt	2010-01-31 03:06:36 UTC (rev 2900)
+++ trunk/CMakeLists.txt	2010-02-02 18:14:43 UTC (rev 2901)
@@ -217,9 +217,13 @@
 # TODO: output to CMAKE_CURRENT_BINARY_DIR instead of CMAKE_SOURCE_DIR
 
 if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/include/geos/platform.h)
-  file(RENAME
-    ${CMAKE_CURRENT_SOURCE_DIR}/include/geos/platform.h
-    ${CMAKE_CURRENT_SOURCE_DIR}/include/geos/platform.h.disabled)
+  if (${CMAKE_VERSION} VERSION_LESS "2.8.0")
+    file(REMOVE ${CMAKE_CURRENT_SOURCE_DIR}/include/geos/platform.h)
+  else()
+    file(RENAME
+      ${CMAKE_CURRENT_SOURCE_DIR}/include/geos/platform.h
+      ${CMAKE_CURRENT_SOURCE_DIR}/include/geos/platform.h.disabled)
+  endif()
 endif()
 
 configure_file(${CMAKE_CURRENT_SOURCE_DIR}/include/geos/platform.h.cmake 



More information about the geos-commits mailing list