diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2011-05-25 14:57:16 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2011-05-25 14:57:16 (GMT) |
commit | 243cf5ce6c9ff4531a252b44d513ee25fe390313 (patch) | |
tree | 729cc114abb74b0f6ca5dd48da146f528adb9882 | |
parent | 48dc2ca2fc8bd929401c56908c4daf1b922e8d0e (diff) | |
download | hdf5-243cf5ce6c9ff4531a252b44d513ee25fe390313.zip hdf5-243cf5ce6c9ff4531a252b44d513ee25fe390313.tar.gz hdf5-243cf5ce6c9ff4531a252b44d513ee25fe390313.tar.bz2 |
[svn-r20899] Add soversion handling - use config/lt_vers.am file.
Bring r20895 from 1.8
-rw-r--r-- | CMakeLists.txt | 13 | ||||
-rw-r--r-- | config/cmake/HDF5Macros.cmake | 9 |
2 files changed, 20 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index c7cbf57..538fb32 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -163,6 +163,18 @@ STRING (REGEX REPLACE ".*#define[ \t]+H5_VERS_RELEASE[ \t]+([0-9]*).*$" #MESSAGE (STATUS "VERSION: ${H5_VERS_MAJOR}.${H5_VERS_MINOR}.${H5_VERS_RELEASE}-${H5_VERS_SUBRELEASE}") #----------------------------------------------------------------------------- +# parse the full soversion number from config/lt_vers.am and include in H5_SOVERS_INFO +#----------------------------------------------------------------------------- +FILE (READ ${HDF5_SOURCE_DIR}/config/lt_vers.am _lt_vers_am_contents) +STRING (REGEX REPLACE ".*LT_VERS_INTERFACE[ \t]+=[ \t]+([0-9]*).*$" + "\\1" H5_SOVERS_MAJOR ${_lt_vers_am_contents}) +STRING (REGEX REPLACE ".*LT_VERS_REVISION[ \t]+=[ \t]+([0-9]*).*$" + "\\1" H5_SOVERS_MINOR ${_lt_vers_am_contents}) +STRING (REGEX REPLACE ".*LT_VERS_AGE[ \t]+=[ \t]+([0-9]*).*$" + "\\1" H5_SOVERS_RELEASE ${_lt_vers_am_contents}) +MESSAGE (STATUS "SOVERSION: ${H5_SOVERS_MAJOR}.${H5_SOVERS_MINOR}.${H5_SOVERS_RELEASE}") + +#----------------------------------------------------------------------------- # Basic HDF5 stuff here #----------------------------------------------------------------------------- SET (HDF5_PACKAGE "hdf5") @@ -171,6 +183,7 @@ SET (HDF5_PACKAGE_VERSION "${H5_VERS_MAJOR}.${H5_VERS_MINOR}.${H5_VERS_RELEASE}" SET (HDF5_PACKAGE_VERSION_MAJOR "${H5_VERS_MAJOR}.${H5_VERS_MINOR}") SET (HDF5_PACKAGE_VERSION_MINOR "${H5_VERS_RELEASE}") SET (HDF5_PACKAGE_VERSION_STRING "${HDF5_PACKAGE_VERSION}") +SET (HDF5_PACKAGE_SOVERSION "${H5_SOVERS_MAJOR}.${H5_SOVERS_MINOR}.${H5_SOVERS_RELEASE}") SET (HDF5_PACKAGE_STRING "${HDF5_PACKAGE_NAME} ${HDF5_PACKAGE_VERSION_STRING}") SET (HDF5_PACKAGE_TARNAME "hdf5") SET (HDF5_PACKAGE_URL "http://www.hdfgroup.org") diff --git a/config/cmake/HDF5Macros.cmake b/config/cmake/HDF5Macros.cmake index b9e37bb..3e6ee18 100644 --- a/config/cmake/HDF5Macros.cmake +++ b/config/cmake/HDF5Macros.cmake @@ -1,6 +1,6 @@ #------------------------------------------------------------------------------- MACRO (H5_SET_LIB_OPTIONS libtarget libname libtype) - HDF_SET_LIB_OPTIONS (${libtarget} ${libname} ${libtype}) + SET (LIB_OUT_NAME "${libname}") IF (${libtype} MATCHES "SHARED") IF (WIN32) SET (LIBHDF_VERSION ${HDF5_PACKAGE_VERSION_MAJOR}) @@ -8,8 +8,13 @@ MACRO (H5_SET_LIB_OPTIONS libtarget libname libtype) SET (LIBHDF_VERSION ${HDF5_PACKAGE_VERSION}) ENDIF (WIN32) SET_TARGET_PROPERTIES (${libtarget} PROPERTIES VERSION ${LIBHDF_VERSION}) - SET_TARGET_PROPERTIES (${libtarget} PROPERTIES SOVERSION ${LIBHDF_VERSION}) + IF (WIN32) + SET (${LIB_OUT_NAME} "${LIB_OUT_NAME}-${HDF5_PACKAGE_SOVERSION}") + ELSE (WIN32) + SET_TARGET_PROPERTIES (${libtarget} PROPERTIES SOVERSION ${HDF5_PACKAGE_SOVERSION}) + ENDIF (WIN32) ENDIF (${libtype} MATCHES "SHARED") + HDF_SET_LIB_OPTIONS (${libtarget} ${LIB_OUT_NAME} ${libtype}) #-- Apple Specific install_name for libraries IF (APPLE) |