[geos-commits] r2857 - in trunk: . include/geos

svn_geos at osgeo.org svn_geos at osgeo.org
Sat Jan 16 16:25:24 EST 2010


Author: mloskot
Date: 2010-01-16 16:25:23 -0500 (Sat, 16 Jan 2010)
New Revision: 2857

Added:
   trunk/include/geos/version.h.cmake
Modified:
   trunk/CMakeLists.txt
Log:
Set version numbers and generate version.h for CMake build (#317)

Modified: trunk/CMakeLists.txt
===================================================================
--- trunk/CMakeLists.txt	2010-01-16 20:41:55 UTC (rev 2856)
+++ trunk/CMakeLists.txt	2010-01-16 21:25:23 UTC (rev 2857)
@@ -16,10 +16,48 @@
 
 #set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
 
+#################################################################################
+# Configure GEOS version
+#################################################################################
+
+# GEOS release version
+# GEOS C++ library SONAME will use these encoding ABI break at every release
+set(VERSION_MAJOR 3)
+set(VERSION_MINOR 3)
+set(VERSION_PATCH 0)
+set(VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}")
+
+# JTS_PORT is the version of JTS this release is bound to
+set(JTS_PORT 1.10.0)
+message(STATUS "Setting GEOS version ${VERSION} as port of JTS ${JTS_PORT}")
+
+# GEOS C API version
+set(CAPI_INTERFACE_CURRENT 7)
+set(CAPI_INTERFACE_REVISION 1)
+set(CAPI_INTERFACE_AGE 6)
+
+math(EXPR CAPI_VERSION_MAJOR "${CAPI_INTERFACE_CURRENT} - ${CAPI_INTERFACE_AGE}")
+set(CAPI_VERSION_MINOR ${CAPI_INTERFACE_AGE})
+set(CAPI_VERSION_PATCH ${CAPI_INTERFACE_REVISION})
+set(CAPI_VERSION "${CAPI_VERSION_MAJOR}.${CAPI_VERSION_MINOR}.${CAPI_VERSION_PATCH}")
+message(STATUS "Setting GEOS C API version ${CAPI_VERSION}")
+
+# TODO: consider setting in ${CMAKE_CURRENT_BINARY_DIR}/include/geos/version.h )
+configure_file(${CMAKE_SOURCE_DIR}/include/geos/version.h.cmake 
+  ${CMAKE_SOURCE_DIR}/include/geos/version.h )
+
+#################################################################################
+# Configure C/C++ compiler options
+#################################################################################
+
 if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic -Wall -Wno-long-long -ansi")
   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
 endif()
 
+#################################################################################
+# Configure subdirectories
+#################################################################################
+
 add_subdirectory(src)
 add_subdirectory(capi)

Added: trunk/include/geos/version.h.cmake
===================================================================
--- trunk/include/geos/version.h.cmake	                        (rev 0)
+++ trunk/include/geos/version.h.cmake	2010-01-16 21:25:23 UTC (rev 2857)
@@ -0,0 +1,41 @@
+/**********************************************************************
+ * $Id$
+ *
+ * version.h - generated by CMake from version.h.cmake
+ *
+ * GEOS - Geometry Engine Open Source
+ * http://geos.refractions.net
+ *
+ * Copyright (C) 2009 Mateusz Loskot
+ * Copyright (C) 2007 Refractions Research Inc.
+ *
+ * This is free software; you can redistribute and/or modify it under
+ * the terms of the GNU Lesser General Public Licence as published
+ * by the Free Software Foundation. 
+ * See the COPYING file for more information.
+ *
+ **********************************************************************/
+#ifndef GEOS_VERSION_H_INCLUDED
+#define GEOS_VERSION_H_INCLUDED
+
+#ifndef GEOS_VERSION_MAJOR
+#define GEOS_VERSION_MAJOR ${VERSION_MAJOR}
+#endif
+
+#ifndef GEOS_VERSION_MINOR
+#define GEOS_VERSION_MINOR ${VERSION_MINOR}
+#endif
+
+#ifndef GEOS_VERSION_PATCH
+#define GEOS_VERSION_PATCH ${VERSION_PATCH}
+#endif
+
+#ifndef GEOS_VERSION
+#define GEOS_VERSION "${VERSION}"
+#endif
+
+#ifndef GEOS_JTS_PORT
+#define GEOS_JTS_PORT "${JTS_PORT}"
+#endif
+
+#endif
\ No newline at end of file



More information about the geos-commits mailing list