summaryrefslogtreecommitdiffstats
path: root/config/cmake/HDF5Macros.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'config/cmake/HDF5Macros.cmake')
-rw-r--r--config/cmake/HDF5Macros.cmake12
1 files changed, 12 insertions, 0 deletions
diff --git a/config/cmake/HDF5Macros.cmake b/config/cmake/HDF5Macros.cmake
index ee9ed84..976b910 100644
--- a/config/cmake/HDF5Macros.cmake
+++ b/config/cmake/HDF5Macros.cmake
@@ -26,6 +26,18 @@ macro (H5_SET_LIB_OPTIONS libtarget libname libtype)
BUILD_WITH_INSTALL_RPATH ${HDF5_BUILD_WITH_INSTALL_NAME}
)
endif (HDF5_BUILD_WITH_INSTALL_NAME)
+ if (HDF5_BUILD_FRAMEWORKS)
+ if (${libtype} MATCHES "SHARED")
+ # adapt target to build frameworks instead of dylibs
+ set_target_properties(${libtarget} PROPERTIES
+ XCODE_ATTRIBUTE_INSTALL_PATH "@rpath"
+ FRAMEWORK TRUE
+ FRAMEWORK_VERSION ${HDF5_PACKAGE_VERSION_MAJOR}
+ MACOSX_FRAMEWORK_IDENTIFIER org.hdfgroup.${libtarget}
+ MACOSX_FRAMEWORK_SHORT_VERSION_STRING ${HDF5_PACKAGE_VERSION_MAJOR}
+ MACOSX_FRAMEWORK_BUNDLE_VERSION ${HDF5_PACKAGE_VERSION_MAJOR})
+ endif (${libtype} MATCHES "SHARED")
+ endif (HDF5_BUILD_FRAMEWORKS)
endif (APPLE)
endmacro (H5_SET_LIB_OPTIONS)