diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2019-01-22 18:09:59 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2019-01-22 18:10:09 (GMT) |
commit | ce64bf57ce149b94422e602a920439749d305a5b (patch) | |
tree | 318ad701ae32e4e8fc03b56b5610db3607b0e505 /config/cmake/HDF5Macros.cmake | |
parent | 811b4bea8ef6d277da7b3ad5aecb71c56252d610 (diff) | |
download | hdf5-ce64bf57ce149b94422e602a920439749d305a5b.zip hdf5-ce64bf57ce149b94422e602a920439749d305a5b.tar.gz hdf5-ce64bf57ce149b94422e602a920439749d305a5b.tar.bz2 |
HDFFV-10685 Always set Mac version flags - use soversion
Diffstat (limited to 'config/cmake/HDF5Macros.cmake')
-rw-r--r-- | config/cmake/HDF5Macros.cmake | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/config/cmake/HDF5Macros.cmake b/config/cmake/HDF5Macros.cmake index 6c203e2..3660453 100644 --- a/config/cmake/HDF5Macros.cmake +++ b/config/cmake/HDF5Macros.cmake @@ -26,6 +26,10 @@ 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_SOVERSION} ${CMAKE_C_OSX_COMPATIBILITY_VERSION_FLAG}${LIBHDF_VERSION}.0.0" + endif () endif () HDF_SET_LIB_OPTIONS (${libtarget} ${LIB_OUT_NAME} ${libtype}) @@ -33,9 +37,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} |