summaryrefslogtreecommitdiffstats
path: root/config/cmake
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2019-01-22 18:09:59 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2019-01-22 18:10:09 (GMT)
commitce64bf57ce149b94422e602a920439749d305a5b (patch)
tree318ad701ae32e4e8fc03b56b5610db3607b0e505 /config/cmake
parent811b4bea8ef6d277da7b3ad5aecb71c56252d610 (diff)
downloadhdf5-ce64bf57ce149b94422e602a920439749d305a5b.zip
hdf5-ce64bf57ce149b94422e602a920439749d305a5b.tar.gz
hdf5-ce64bf57ce149b94422e602a920439749d305a5b.tar.bz2
HDFFV-10685 Always set Mac version flags - use soversion
Diffstat (limited to 'config/cmake')
-rw-r--r--config/cmake/HDF5Macros.cmake7
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}