[geos-commits] r3683 - in trunk: . capi src

svn_geos at osgeo.org svn_geos at osgeo.org
Sun Jun 24 15:22:26 PDT 2012


Author: mloskot
Date: 2012-06-24 15:22:26 -0700 (Sun, 24 Jun 2012)
New Revision: 3683

Modified:
   trunk/CMakeLists.txt
   trunk/capi/CMakeLists.txt
   trunk/src/CMakeLists.txt
Log:
[CMake] Set SOVERSION property on C API shared library using CAPI_INTERFACE_* values (Ticket #446).

Modified: trunk/CMakeLists.txt
===================================================================
--- trunk/CMakeLists.txt	2012-06-24 15:16:18 UTC (rev 3682)
+++ trunk/CMakeLists.txt	2012-06-24 22:22:26 UTC (rev 3683)
@@ -46,6 +46,11 @@
 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}")
+if (NOT WIN32)
+  set(CAPI_SOVERSION
+    "${CAPI_INTERFACE_CURRENT}.${CAPI_INTERFACE_REVISION}.${CAPI_INTERFACE_AGE}")
+  message(STATUS "Setting GEOS C API soversion ${CAPI_SOVERSION}")
+endif()
 
 #################################################################################
 # Check custom global options

Modified: trunk/capi/CMakeLists.txt
===================================================================
--- trunk/capi/CMakeLists.txt	2012-06-24 15:16:18 UTC (rev 3682)
+++ trunk/capi/CMakeLists.txt	2012-06-24 22:22:26 UTC (rev 3683)
@@ -27,11 +27,19 @@
 
   target_link_libraries(geos_c geos)
 
-  # TODO: Enable SOVERSION property
-  set_target_properties(geos_c
-    PROPERTIES
-    VERSION ${CAPI_VERSION}
-    CLEAN_DIRECT_OUTPUT 1)
+  if (WIN32)
+    set_target_properties(geos_c
+      PROPERTIES
+      VERSION ${CAPI_VERSION}
+      CLEAN_DIRECT_OUTPUT 1)
+  else()
+    set_target_properties(geos_c
+      PROPERTIES
+      VERSION ${CAPI_VERSION}
+      SOVERSION ${CAPI_SOVERSION}
+      CLEAN_DIRECT_OUTPUT 1)
+  endif()
+
 endif()
 
 #################################################################################

Modified: trunk/src/CMakeLists.txt
===================================================================
--- trunk/src/CMakeLists.txt	2012-06-24 15:16:18 UTC (rev 3682)
+++ trunk/src/CMakeLists.txt	2012-06-24 22:22:26 UTC (rev 3683)
@@ -64,7 +64,6 @@
   add_library(geos SHARED ${geos_SOURCES} ${geos_ALL_HEADERS})
   add_library(geos-static STATIC ${geos_SOURCES} ${geos_ALL_HEADERS})
 
-# TODO: Enable SOVERSION property
   set_target_properties(geos
     PROPERTIES
     DEFINE_SYMBOL GEOS_DLL_EXPORT



More information about the geos-commits mailing list