diff options
author | Jordan Henderson <jhenderson@hdfgroup.org> | 2019-01-24 21:08:17 (GMT) |
---|---|---|
committer | Jordan Henderson <jhenderson@hdfgroup.org> | 2019-01-24 21:08:17 (GMT) |
commit | e90d59a69f2750ac55ef5da20df5e8cba7693134 (patch) | |
tree | 20465ef867a3fc3825db0955a30b0fd39c61ed2a /config/cmake/HDF5Macros.cmake | |
parent | 8eb86b5a2474d44429bd83775fc5af0e7ed70ad5 (diff) | |
parent | d26963b180a052ac063907f95596a7ecad08ef8e (diff) | |
download | hdf5-e90d59a69f2750ac55ef5da20df5e8cba7693134.zip hdf5-e90d59a69f2750ac55ef5da20df5e8cba7693134.tar.gz hdf5-e90d59a69f2750ac55ef5da20df5e8cba7693134.tar.bz2 |
Merging in latest from upstream (HDFFV/hdf5:refs/heads/hdf5_1_10)
* commit 'd26963b180a052ac063907f95596a7ecad08ef8e':
Add clear objects to ignore tests
Add new clear tests to ignore list
Cleanup variable names
HDFFV-10685 Always set version flags on OSX
Diffstat (limited to 'config/cmake/HDF5Macros.cmake')
-rw-r--r-- | config/cmake/HDF5Macros.cmake | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/config/cmake/HDF5Macros.cmake b/config/cmake/HDF5Macros.cmake index 6c203e2..007bc29 100644 --- a/config/cmake/HDF5Macros.cmake +++ b/config/cmake/HDF5Macros.cmake @@ -15,6 +15,8 @@ macro (H5_SET_LIB_OPTIONS libtarget libname libtype libpackage) # SOVERSION passed in ARGN when shared if (${libtype} MATCHES "SHARED") set (PACKAGE_SOVERSION ${HDF5_${libpackage}_PACKAGE_SOVERSION}) + set (PACKAGE_COMPATIBILITY ${H5_${libpackage}_SOVERS_INTERFACE}.0.0) + set (PACKAGE_CURRENT ${H5_${libpackage}_SOVERS_INTERFACE}.${H5_${libpackage}_SOVERS_MINOR}.0) if (WIN32) set (LIBHDF_VERSION ${HDF5_PACKAGE_VERSION_MAJOR}) else () @@ -26,6 +28,11 @@ macro (H5_SET_LIB_OPTIONS libtarget libname libtype libpackage) else () set_target_properties (${libtarget} PROPERTIES SOVERSION ${LIBHDF_VERSION}) endif () + if (CMAKE_C_OSX_CURRENT_VERSION_FLAG) + set_property(TARGET ${libtarget} APPEND PROPERTY + LINK_FLAGS "${CMAKE_C_OSX_CURRENT_VERSION_FLAG}${PACKAGE_CURRENT} ${CMAKE_C_OSX_COMPATIBILITY_VERSION_FLAG}${PACKAGE_COMPATIBILITY}" + ) + endif () endif () HDF_SET_LIB_OPTIONS (${libtarget} ${LIB_OUT_NAME} ${libtype}) @@ -33,9 +40,6 @@ macro (H5_SET_LIB_OPTIONS libtarget libname libtype libpackage) if (APPLE) option (HDF5_BUILD_WITH_INSTALL_NAME "Build with library install_name set to the installation path" OFF) if (HDF5_BUILD_WITH_INSTALL_NAME) - set_property(TARGET ${libtarget} APPEND PROPERTY - LINK_FLAGS "-current_version ${HDF5_PACKAGE_VERSION} -compatibility_version ${HDF5_PACKAGE_VERSION}" - ) set_target_properties (${libtarget} PROPERTIES INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib" BUILD_WITH_INSTALL_RPATH ${HDF5_BUILD_WITH_INSTALL_NAME} |