Reset SOVERSION for libgromacs
authorTeemu Murtola <teemu.murtola@gmail.com>
Sat, 28 Dec 2013 04:57:19 +0000 (06:57 +0200)
committerGerrit Code Review <gerrit@gerrit.gromacs.org>
Sun, 29 Dec 2013 01:36:55 +0000 (02:36 +0100)
Since 5.0 will be the first version with the library name libgromacs,
there is no reason to start the numbering from 8.
Also set the VERSION for completeness.

Related to #1147

Change-Id: Id048adcb85cf833bc947ac73e8d7bbdb5d600815

CMakeLists.txt
src/gromacs/CMakeLists.txt

index e4e640140b3849e57bdcd30154f5cfb3969c892a..b6d59c791a9e2c1ad55ea85873b6d28b961fb8c4 100644 (file)
@@ -64,14 +64,15 @@ mark_as_advanced(CUSTOM_VERSION_STRING)
 if (CUSTOM_VERSION_STRING)
     set(PROJECT_VERSION ${CUSTOM_VERSION_STRING})
 endif (CUSTOM_VERSION_STRING)
-set(SOVERSION 8)
+set(LIBRARY_SOVERSION 0)
+set(LIBRARY_VERSION ${LIBRARY_SOVERSION}.0.0)
 # It is a bit irritating, but this has to be set separately for now!
 SET(CPACK_PACKAGE_VERSION_MAJOR "5")
 SET(CPACK_PACKAGE_VERSION_MINOR "0")
 #SET(CPACK_PACKAGE_VERSION_PATCH "0")
 
 # The numerical gromacs version. It is 40600 for 4.6.0.
-# The #define GMX_VERSION in gmx_header_config_h is set to this value.
+# The #define GMX_VERSION in gromacs/version.h is set to this value.
 math(EXPR NUM_VERSION 
     "${CPACK_PACKAGE_VERSION_MAJOR}*10000 + ${CPACK_PACKAGE_VERSION_MINOR}*100")
 if(CPACK_PACKAGE_VERSION_PATCH)
index 7fc98a0f97f93b6bd5278f5013695ffda883bb4f..27a2915d1d08ad55bc9ab55c8102895e7f2cd836 100644 (file)
@@ -130,7 +130,8 @@ target_link_libraries(libgromacs ${GMX_GPU_LIBRARIES}
                       ${THREAD_LIB} ${GMX_SHARED_LINKER_FLAGS})
 set_target_properties(libgromacs PROPERTIES
                       OUTPUT_NAME "gromacs${GMX_LIBS_SUFFIX}"
-                      SOVERSION ${SOVERSION}
+                      SOVERSION ${LIBRARY_SOVERSION}
+                      VERSION ${LIBRARY_VERSION}
                       COMPILE_FLAGS "${OpenMP_C_FLAGS}")
 
 # Only install the library in mdrun-only mode if it is actually necessary