diff options
-rw-r--r-- | config/cmake/HDF5Macros.cmake | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/config/cmake/HDF5Macros.cmake b/config/cmake/HDF5Macros.cmake index bd86f34..d88e672 100644 --- a/config/cmake/HDF5Macros.cmake +++ b/config/cmake/HDF5Macros.cmake @@ -1,7 +1,13 @@ #------------------------------------------------------------------------------- macro (H5_SET_LIB_OPTIONS libtarget libname libtype) set (LIB_OUT_NAME "${libname}") + # SOVERSION passed in ARGN when shared if (${libtype} MATCHES "SHARED") + if (ARGN) + set (PACKAGE_SOVERSION ${ARGN}) + else (ARGN) + set (PACKAGE_SOVERSION ${HDF5_PACKAGE_SOVERSION}) + endif (ARGN) if (WIN32) set (LIBHDF_VERSION ${HDF5_PACKAGE_VERSION_MAJOR}) else (WIN32) @@ -9,9 +15,9 @@ macro (H5_SET_LIB_OPTIONS libtarget libname libtype) endif (WIN32) set_target_properties (${libtarget} PROPERTIES VERSION ${LIBHDF_VERSION}) if (WIN32) - set (${LIB_OUT_NAME} "${LIB_OUT_NAME}-${HDF5_PACKAGE_SOVERSION}") + set (${LIB_OUT_NAME} "${LIB_OUT_NAME}-${PACKAGE_SOVERSION}") else (WIN32) - set_target_properties (${libtarget} PROPERTIES SOVERSION ${HDF5_PACKAGE_SOVERSION}) + set_target_properties (${libtarget} PROPERTIES SOVERSION ${PACKAGE_SOVERSION}) endif (WIN32) endif (${libtype} MATCHES "SHARED") HDF_SET_LIB_OPTIONS (${libtarget} ${LIB_OUT_NAME} ${libtype}) @@ -39,4 +45,5 @@ macro (H5_SET_LIB_OPTIONS libtarget libname libtype) endif (${libtype} MATCHES "SHARED") endif (HDF5_BUILD_FRAMEWORKS) endif (APPLE) + endmacro (H5_SET_LIB_OPTIONS) |