summaryrefslogtreecommitdiffstats
path: root/config/cmake
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2015-07-09 16:56:16 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2015-07-09 16:56:16 (GMT)
commit8bbe712961a9b88d5fda838ec745f40217c28c8c (patch)
treea8d3bd0040318e120ff104b2a9467a1c02b8772b /config/cmake
parent7a72d82cdad8d8d83cbb457c5625dac65c8cd72a (diff)
downloadhdf5-8bbe712961a9b88d5fda838ec745f40217c28c8c.zip
hdf5-8bbe712961a9b88d5fda838ec745f40217c28c8c.tar.gz
hdf5-8bbe712961a9b88d5fda838ec745f40217c28c8c.tar.bz2
[svn-r27364] Add Mac Framework support
Diffstat (limited to 'config/cmake')
-rw-r--r--config/cmake/CPack.Info.plist.in26
-rw-r--r--config/cmake/HDF5Macros.cmake12
-rw-r--r--config/cmake/HDFCompilerFlags.cmake4
-rw-r--r--config/cmake/cacheinit.cmake2
4 files changed, 42 insertions, 2 deletions
diff --git a/config/cmake/CPack.Info.plist.in b/config/cmake/CPack.Info.plist.in
new file mode 100644
index 0000000..08d371b
--- /dev/null
+++ b/config/cmake/CPack.Info.plist.in
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>English</string>
+ <key>CFBundleExecutable</key>
+ <string>@CPACK_PACKAGE_FILE_NAME@</string>
+ <key>CFBundleIconFile</key>
+ <string>@CPACK_BUNDLE_ICON@</string>
+ <key>CFBundleIdentifier</key>
+ <string>org.@CPACK_PACKAGE_VENDOR@.@CPACK_PACKAGE_NAME@@CPACK_MODULE_VERSION_SUFFIX@</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundlePackageType</key>
+ <string>FMWK</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+ <string>@CPACK_PACKAGE_VERSIO@</string>
+ <key>CFBundleShortVersionString</key>
+ <string>@CPACK_SHORT_VERSION_STRING@</string>
+ <key>CSResourcesFileMapped</key>
+ <true/>
+</dict>
+</plist>
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)
diff --git a/config/cmake/HDFCompilerFlags.cmake b/config/cmake/HDFCompilerFlags.cmake
index 56d17bf..c637c73 100644
--- a/config/cmake/HDFCompilerFlags.cmake
+++ b/config/cmake/HDFCompilerFlags.cmake
@@ -5,7 +5,7 @@ if (CMAKE_COMPILER_IS_GNUCC)
if (CMAKE_BUILD_TYPE MATCHES Debug)
set (CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS} -std=c99")
if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 5.0)
- set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ftrapv -fno-common")
+ set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Og -ftrapv -fno-common")
endif ()
else (CMAKE_BUILD_TYPE MATCHES Debug)
set (CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS} -std=c99")
@@ -18,7 +18,7 @@ if (CMAKE_COMPILER_IS_GNUCXX)
if (CMAKE_BUILD_TYPE MATCHES Debug)
set (CMAKE_CXX_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_CXX_FLAGS} -std=c99")
if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0)
- set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ftrapv -fno-common")
+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Og -ftrapv -fno-common")
endif ()
else (CMAKE_BUILD_TYPE MATCHES Debug)
set (CMAKE_CXX_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_CXX_FLAGS} -std=c99")
diff --git a/config/cmake/cacheinit.cmake b/config/cmake/cacheinit.cmake
index 87d4fcc..f869949 100644
--- a/config/cmake/cacheinit.cmake
+++ b/config/cmake/cacheinit.cmake
@@ -8,6 +8,8 @@ set (BUILD_SHARED_LIBS ON CACHE BOOL "Build Shared Libraries" FORCE)
set (BUILD_TESTING ON CACHE BOOL "Build HDF5 Unit Testing" FORCE)
+set (CMAKE_INSTALL_FRAMEWORK_PREFIX "Library/Frameworks" CACHE STRING "Frameworks installation directory" FORCE)
+
set (HDF_PACKAGE_EXT "" CACHE STRING "Name of HDF package extension" FORCE)
set (HDF5_BUILD_FORTRAN ON CACHE BOOL "Build FORTRAN support" FORCE)