summaryrefslogtreecommitdiffstats
path: root/CMakeInstallation.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeInstallation.cmake')
-rw-r--r--CMakeInstallation.cmake41
1 files changed, 40 insertions, 1 deletions
diff --git a/CMakeInstallation.cmake b/CMakeInstallation.cmake
index 0d071e7..98c75c9 100644
--- a/CMakeInstallation.cmake
+++ b/CMakeInstallation.cmake
@@ -137,6 +137,46 @@ IF (HDF5_PACK_EXAMPLES)
ENDIF (HDF5_PACK_EXAMPLES)
#-----------------------------------------------------------------------------
+# Configure the README.txt file for the binary package
+#-----------------------------------------------------------------------------
+SET (BINARY_SYSTEM_NAME ${CMAKE_SYSTEM_NAME})
+SET (BINARY_PLATFORM "${CMAKE_SYSTEM_NAME}")
+IF (WIN32)
+ SET (BINARY_EXAMPLE_ENDING "zip")
+ SET (BINARY_INSTALL_ENDING "exe")
+ IF (CMAKE_CL_64)
+ SET (BINARY_SYSTEM_NAME "win64")
+ ELSE (CMAKE_CL_64)
+ SET (BINARY_SYSTEM_NAME "win32")
+ ENDIF (CMAKE_CL_64)
+ IF (${CMAKE_SYSTEM_VERSION} MATCHES "6.1")
+ SET (BINARY_PLATFORM "${BINARY_PLATFORM} 7")
+ ELSEIF (${CMAKE_SYSTEM_VERSION} MATCHES "6.2")
+ SET (BINARY_PLATFORM "${BINARY_PLATFORM} 8")
+ ENDIF (${CMAKE_SYSTEM_VERSION} MATCHES "6.1")
+ SET (BINARY_PLATFORM "${BINARY_PLATFORM} ${MSVC_C_ARCHITECTURE_ID}")
+ SET (BINARY_PLATFORM "${BINARY_PLATFORM}, using VISUAL STUDIO ${CMAKE_C_COMPILER_VERSION}")
+ELSEIF (APPLE)
+ SET (BINARY_EXAMPLE_ENDING "tar.gz")
+ SET (BINARY_INSTALL_ENDING "dmg")
+ SET (BINARY_PLATFORM "${BINARY_PLATFORM} ${CMAKE_SYSTEM_VERSION} ${CMAKE_SYSTEM_PROCESSOR}")
+ SET (BINARY_PLATFORM "${BINARY_PLATFORM}, using ${CMAKE_C_COMPILER_ID} C ${CMAKE_C_COMPILER_VERSION}")
+ELSE (WIN32)
+ SET (BINARY_EXAMPLE_ENDING "tar.gz")
+ SET (BINARY_INSTALL_ENDING "sh")
+ SET (BINARY_PLATFORM "${BINARY_PLATFORM} ${CMAKE_SYSTEM_VERSION} ${CMAKE_SYSTEM_PROCESSOR}")
+ SET (BINARY_PLATFORM "${BINARY_PLATFORM}, using ${CMAKE_C_COMPILER_ID} C ${CMAKE_C_COMPILER_VERSION}")
+ENDIF (WIN32)
+IF (HDF4_BUILD_FORTRAN)
+ SET (BINARY_PLATFORM "${BINARY_PLATFORM} / ${CMAKE_Fortran_COMPILER_ID} Fortran")
+ENDIF (HDF4_BUILD_FORTRAN)
+
+CONFIGURE_FILE (
+ ${HDF5_RESOURCES_DIR}/README.txt.cmake.in
+ ${HDF5_BINARY_DIR}/README.txt @ONLY
+)
+
+#-----------------------------------------------------------------------------
# Add Document File(s) to CMake Install
#-----------------------------------------------------------------------------
IF (NOT HDF5_EXTERNALLY_CONFIGURED)
@@ -236,7 +276,6 @@ IF (NOT HDF5_EXTERNALLY_CONFIGURED AND NOT HDF5_NO_PACKAGES)
SET (CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE ON)
SET (CPACK_PACKAGE_DEFAULT_LOCATION "/opt/${CPACK_PACKAGE_NAME}")
SET (CPACK_PACKAGING_INSTALL_PREFIX "/")
- SET (CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}")
SET (CPACK_PACKAGE_ICON "${HDF5_RESOURCES_DIR}/hdf.gif")
SET (CPACK_SET_DESTDIR TRUE) # Required when packaging, and set CMAKE_INSTALL_PREFIX to "/".