summaryrefslogtreecommitdiffstats
path: root/CMakeInstallation.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeInstallation.cmake')
-rw-r--r--CMakeInstallation.cmake92
1 files changed, 24 insertions, 68 deletions
diff --git a/CMakeInstallation.cmake b/CMakeInstallation.cmake
index 6d090f6..0389a0b 100644
--- a/CMakeInstallation.cmake
+++ b/CMakeInstallation.cmake
@@ -26,7 +26,7 @@ endif (NOT HDF5_EXTERNALLY_CONFIGURED)
# Export all exported targets to the build tree for use by parent project
#-----------------------------------------------------------------------------
if (NOT HDF5_EXTERNALLY_CONFIGURED)
- EXPORT (
+ export (
TARGETS ${HDF5_LIBRARIES_TO_EXPORT} ${HDF5_LIB_DEPENDENCIES}
FILE ${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-targets.cmake
)
@@ -44,7 +44,7 @@ set (HDF5_VERSION_MAJOR @HDF5_PACKAGE_VERSION_MAJOR@)
set (HDF5_VERSION_MINOR @HDF5_PACKAGE_VERSION_MINOR@)
configure_file (
- ${HDF5_RESOURCES_DIR}/hdf5-config.cmake.build.in
+ ${HDF_RESOURCES_DIR}/hdf5-config.cmake.build.in
${HDF5_BINARY_DIR}/${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-config.cmake @ONLY
)
@@ -53,7 +53,7 @@ configure_file (
#-----------------------------------------------------------------------------
if (NOT HDF5_EXTERNALLY_CONFIGURED)
configure_file (
- ${HDF5_RESOURCES_DIR}/FindHDF5.cmake.in
+ ${HDF_RESOURCES_DIR}/FindHDF5.cmake.in
${HDF5_BINARY_DIR}/CMakeFiles/FindHDF5${HDF_PACKAGE_EXT}.cmake @ONLY
)
install (
@@ -68,7 +68,7 @@ endif (NOT HDF5_EXTERNALLY_CONFIGURED)
#-----------------------------------------------------------------------------
if (NOT HDF5_EXTERNALLY_CONFIGURED)
configure_file (
- ${HDF5_RESOURCES_DIR}/hdf5-config.cmake.install.in
+ ${HDF_RESOURCES_DIR}/hdf5-config.cmake.install.in
${HDF5_BINARY_DIR}/CMakeFiles/${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-config.cmake @ONLY
)
install (
@@ -83,7 +83,7 @@ endif (NOT HDF5_EXTERNALLY_CONFIGURED)
#-----------------------------------------------------------------------------
if (NOT HDF5_EXTERNALLY_CONFIGURED)
configure_file (
- ${HDF5_RESOURCES_DIR}/hdf5-config-version.cmake.in
+ ${HDF_RESOURCES_DIR}/hdf5-config-version.cmake.in
${HDF5_BINARY_DIR}/CMakeFiles/${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-config-version.cmake @ONLY
)
install (
@@ -102,7 +102,7 @@ else (H5_WORDS_BIGENDIAN)
set (BYTESEX little-endian)
endif (H5_WORDS_BIGENDIAN)
configure_file (
- ${HDF5_RESOURCES_DIR}/libhdf5.settings.cmake.in
+ ${HDF_RESOURCES_DIR}/libhdf5.settings.cmake.in
${HDF5_BINARY_DIR}/libhdf5.settings @ONLY
)
install (
@@ -121,7 +121,7 @@ install (
# set (HDF5LIBS "${HDF5LIBS} -l${libs}")
#endforeach (libs ${HDF5_LIBRARIES_TO_EXPORT})
#configure_file (
-# ${HDF5_RESOURCES_DIR}/libhdf5.pc.in
+# ${HDF_RESOURCES_DIR}/libhdf5.pc.in
# ${HDF5_BINARY_DIR}/CMakeFiles/libhdf5.pc @ONLY
#)
#install (
@@ -135,7 +135,7 @@ install (
option (HDF5_PACK_EXAMPLES "Package the HDF5 Library Examples Compressed File" OFF)
if (HDF5_PACK_EXAMPLES)
configure_file (
- ${HDF5_RESOURCES_DIR}/HDF518_Examples.cmake.in
+ ${HDF_RESOURCES_DIR}/HDF518_Examples.cmake.in
${HDF5_BINARY_DIR}/HDF518_Examples.cmake @ONLY
)
install (
@@ -157,50 +157,7 @@ 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}")
- if (${CMAKE_C_COMPILER_VERSION} MATCHES "16.*")
- set (BINARY_PLATFORM "${BINARY_PLATFORM}, using VISUAL STUDIO 2010")
- elseif (${CMAKE_C_COMPILER_VERSION} MATCHES "15.*")
- set (BINARY_PLATFORM "${BINARY_PLATFORM}, using VISUAL STUDIO 2008")
- elseif (${CMAKE_C_COMPILER_VERSION} MATCHES "17.*")
- set (BINARY_PLATFORM "${BINARY_PLATFORM}, using VISUAL STUDIO 2012")
- else (${CMAKE_C_COMPILER_VERSION} MATCHES "16.*")
- set (BINARY_PLATFORM "${BINARY_PLATFORM}, using VISUAL STUDIO ${CMAKE_C_COMPILER_VERSION}")
- endif (${CMAKE_C_COMPILER_VERSION} MATCHES "16.*")
-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
-)
+HDF_README_PROPERTIES(HDF5_BUILD_FORTRAN)
#-----------------------------------------------------------------------------
# Add Document File(s) to CMake Install
@@ -292,11 +249,11 @@ if (NOT HDF5_EXTERNALLY_CONFIGURED AND NOT HDF5_NO_PACKAGES)
endif (EXISTS "${HDF5_SOURCE_DIR}/release_docs")
set (CPACK_PACKAGE_RELOCATABLE TRUE)
set (CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_VENDOR}/${CPACK_PACKAGE_NAME}/${CPACK_PACKAGE_VERSION}")
- set (CPACK_PACKAGE_ICON "${HDF5_RESOURCES_DIR}/hdf.bmp")
+ set (CPACK_PACKAGE_ICON "${HDF_RESOURCES_EXT_DIR}/hdf.bmp")
set (CPACK_GENERATOR "TGZ")
if (WIN32)
- LIST (APPEND CPACK_GENERATOR "NSIS")
+ list (APPEND CPACK_GENERATOR "NSIS")
# Installers for 32- vs. 64-bit CMake:
# - Root install directory (displayed to end user at installer-run time)
# - "NSIS package/display name" (text used in the installer GUI)
@@ -311,28 +268,27 @@ if (NOT HDF5_EXTERNALLY_CONFIGURED AND NOT HDF5_NO_PACKAGES)
endif (CMAKE_CL_64)
# set the install/unistall icon used for the installer itself
# There is a bug in NSI that does not handle full unix paths properly.
- set (CPACK_NSIS_MUI_ICON "${HDF5_RESOURCES_DIR}\\\\hdf.ico")
- set (CPACK_NSIS_MUI_UNIICON "${HDF5_RESOURCES_DIR}\\\\hdf.ico")
+ set (CPACK_NSIS_MUI_ICON "${HDF_RESOURCES_EXT_DIR}\\\\hdf.ico")
+ set (CPACK_NSIS_MUI_UNIICON "${HDF_RESOURCES_EXT_DIR}\\\\hdf.ico")
# set the package header icon for MUI
- set (CPACK_PACKAGE_ICON "${HDF5_RESOURCES_DIR}\\\\hdf.bmp")
- #set (CPACK_NSIS_DISPLAY_NAME "@CPACK_NSIS_PACKAGE_NAME@, is a data model, library, and file format for storing and managing data")
+ set (CPACK_PACKAGE_ICON "${HDF_RESOURCES_EXT_DIR}\\\\hdf.bmp")
set (CPACK_NSIS_DISPLAY_NAME "@CPACK_NSIS_PACKAGE_NAME@")
set (CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_VENDOR}\\\\${CPACK_PACKAGE_NAME}\\\\${CPACK_PACKAGE_VERSION}")
set (CPACK_MONOLITHIC_INSTALL ON)
set (CPACK_NSIS_CONTACT "${HDF5_PACKAGE_BUGREPORT}")
set (CPACK_NSIS_MODIFY_PATH ON)
elseif (APPLE)
- LIST (APPEND CPACK_GENERATOR "DragNDrop")
+ list (APPEND CPACK_GENERATOR "DragNDrop")
set (CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE ON)
set (CPACK_PACKAGING_INSTALL_PREFIX "/${CPACK_PACKAGE_INSTALL_DIRECTORY}")
- set (CPACK_PACKAGE_ICON "${HDF5_RESOURCES_DIR}/hdf.icns")
-
+ set (CPACK_PACKAGE_ICON "${HDF_RESOURCES_EXT_DIR}/hdf.icns")
+
if (HDF5_PACK_MACOSX_BUNDLE)
- LIST (APPEND CPACK_GENERATOR "Bundle")
+ list (APPEND CPACK_GENERATOR "Bundle")
set (CPACK_BUNDLE_NAME "${HDF5_PACKAGE_STRING}")
set (CPACK_BUNDLE_LOCATION "/") # make sure CMAKE_INSTALL_PREFIX ends in /
set (CMAKE_INSTALL_PREFIX "/${CPACK_BUNDLE_NAME}.framework/Versions/${CPACK_PACKAGE_VERSION}/${CPACK_PACKAGE_NAME}/")
- set (CPACK_BUNDLE_ICON "${HDF5_RESOURCES_DIR}/hdf.icns")
+ set (CPACK_BUNDLE_ICON "${HDF_RESOURCES_EXT_DIR}/hdf.icns")
set (CPACK_BUNDLE_PLIST "${HDF5_BINARY_DIR}/CMakeFiles/Info.plist")
set (CPACK_APPLE_GUI_INFO_STRING "HDF5 (Hierarchical Data Format 5) Software Library and Utilities")
set (CPACK_APPLE_GUI_COPYRIGHT "Copyright © 2006-2014 by The HDF Group. All rights reserved.")
@@ -344,15 +300,15 @@ if (NOT HDF5_EXTERNALLY_CONFIGURED AND NOT HDF5_NO_PACKAGES)
# Configure the Info.plist file for the install bundle
#-----------------------------------------------------------------------------
configure_file (
- ${HDF5_RESOURCES_DIR}/CPack.Info.plist.in
+ ${HDF_RESOURCES_EXT_DIR}/CPack.Info.plist.in
${HDF5_BINARY_DIR}/CMakeFiles/Info.plist @ONLY
)
configure_file (
- ${HDF5_RESOURCES_DIR}/PkgInfo.in
+ ${HDF_RESOURCES_DIR}/PkgInfo.in
${HDF5_BINARY_DIR}/CMakeFiles/PkgInfo @ONLY
)
configure_file (
- ${HDF5_RESOURCES_DIR}/version.plist.in
+ ${HDF_RESOURCES_EXT_DIR}/version.plist.in
${HDF5_BINARY_DIR}/CMakeFiles/version.plist @ONLY
)
install (
@@ -360,9 +316,9 @@ if (NOT HDF5_EXTERNALLY_CONFIGURED AND NOT HDF5_NO_PACKAGES)
${HDF5_BINARY_DIR}/CMakeFiles/version.plist
DESTINATION ..
)
- ENDIF(HDF5_PACK_MACOSX_BUNDLE)
+ endif (HDF5_PACK_MACOSX_BUNDLE)
else (WIN32)
- LIST (APPEND CPACK_GENERATOR "STGZ")
+ list (APPEND CPACK_GENERATOR "STGZ")
set (CPACK_PACKAGING_INSTALL_PREFIX "/${CPACK_PACKAGE_INSTALL_DIRECTORY}")
set (CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE ON)