2010-05-14 00:01:50 +08:00
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
MACRO (H5_SET_LIB_OPTIONS libtarget libname libtype)
|
2011-05-25 22:57:16 +08:00
|
|
|
SET (LIB_OUT_NAME "${libname}")
|
2011-01-05 02:40:26 +08:00
|
|
|
IF (${libtype} MATCHES "SHARED")
|
2010-05-14 00:01:50 +08:00
|
|
|
IF (WIN32)
|
2010-07-08 21:50:49 +08:00
|
|
|
SET (LIBHDF_VERSION ${HDF5_PACKAGE_VERSION_MAJOR})
|
2010-05-14 00:01:50 +08:00
|
|
|
ELSE (WIN32)
|
|
|
|
SET (LIBHDF_VERSION ${HDF5_PACKAGE_VERSION})
|
|
|
|
ENDIF (WIN32)
|
|
|
|
SET_TARGET_PROPERTIES (${libtarget} PROPERTIES VERSION ${LIBHDF_VERSION})
|
2011-05-25 22:57:16 +08:00
|
|
|
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)
|
2011-01-05 02:40:26 +08:00
|
|
|
ENDIF (${libtype} MATCHES "SHARED")
|
2011-05-25 22:57:16 +08:00
|
|
|
HDF_SET_LIB_OPTIONS (${libtarget} ${LIB_OUT_NAME} ${libtype})
|
2010-05-14 00:01:50 +08:00
|
|
|
|
|
|
|
#-- Apple Specific install_name for libraries
|
|
|
|
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_TARGET_PROPERTIES(${libtarget} PROPERTIES
|
|
|
|
LINK_FLAGS "-current_version ${HDF5_PACKAGE_VERSION} -compatibility_version ${HDF5_PACKAGE_VERSION}"
|
|
|
|
INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib"
|
|
|
|
BUILD_WITH_INSTALL_RPATH ${HDF5_BUILD_WITH_INSTALL_NAME}
|
|
|
|
)
|
|
|
|
ENDIF (HDF5_BUILD_WITH_INSTALL_NAME)
|
|
|
|
ENDIF (APPLE)
|
|
|
|
|
|
|
|
ENDMACRO (H5_SET_LIB_OPTIONS)
|