diff options
Diffstat (limited to 'CMakeInstallation.cmake')
-rw-r--r-- | CMakeInstallation.cmake | 63 |
1 files changed, 46 insertions, 17 deletions
diff --git a/CMakeInstallation.cmake b/CMakeInstallation.cmake index 0631c61..bac7581 100644 --- a/CMakeInstallation.cmake +++ b/CMakeInstallation.cmake @@ -112,6 +112,24 @@ install ( ) #----------------------------------------------------------------------------- +# Create pkgconfig files +#----------------------------------------------------------------------------- +#foreach (libs ${LINK_LIBS}) +# set (LIBS "${LIBS} -l${libs}") +#endforeach (libs ${LINK_LIBS}) +#foreach (libs ${HDF5_LIBRARIES_TO_EXPORT}) +# set (HDF5LIBS "${HDF5LIBS} -l${libs}") +#endforeach (libs ${HDF5_LIBRARIES_TO_EXPORT}) +#configure_file ( +# ${HDF5_RESOURCES_DIR}/libhdf5.pc.in +# ${HDF5_BINARY_DIR}/CMakeFiles/libhdf5.pc @ONLY +#) +#install ( +# FILES ${HDF5_BINARY_DIR}/CMakeFiles/libhdf5.pc +# DESTINATION ${HDF5_INSTALL_LIB_DIR}/pkgconfig +#) + +#----------------------------------------------------------------------------- # Configure the HDF518_Examples.cmake file and the examples #----------------------------------------------------------------------------- option (HDF5_PACK_EXAMPLES "Package the HDF5 Library Examples Compressed File" OFF) @@ -200,12 +218,12 @@ if (NOT HDF5_EXTERNALLY_CONFIGURED) ${HDF5_SOURCE_DIR}/release_docs/COPYING ${HDF5_SOURCE_DIR}/release_docs/RELEASE.txt ) - if (WIN32 AND NOT CYGWIN) + if (WIN32) set (release_files ${release_files} ${HDF5_SOURCE_DIR}/release_docs/USING_HDF5_VS.txt ) - endif (WIN32 AND NOT CYGWIN) + endif (WIN32) if (HDF5_PACK_INSTALL_DOCS) set (release_files ${release_files} @@ -214,18 +232,17 @@ if (NOT HDF5_EXTERNALLY_CONFIGURED) ${HDF5_SOURCE_DIR}/release_docs/INSTALL ) if (WIN32) - if (NOT CYGWIN) - set (release_files - ${release_files} - ${HDF5_SOURCE_DIR}/release_docs/INSTALL_Windows.txt - ) - else (NOT CYGWIN) - set (release_files - ${release_files} - ${HDF5_SOURCE_DIR}/release_docs/INSTALL_Cygwin.txt - ) - endif (NOT CYGWIN) + set (release_files + ${release_files} + ${HDF5_SOURCE_DIR}/release_docs/INSTALL_Windows.txt + ) endif (WIN32) + if (CYGWIN) + set (release_files + ${release_files} + ${HDF5_SOURCE_DIR}/release_docs/INSTALL_Cygwin.txt + ) + endif (CYGWIN) if (HDF5_ENABLE_PARALLEL) set (release_files ${release_files} @@ -241,6 +258,19 @@ if (NOT HDF5_EXTERNALLY_CONFIGURED) endif (EXISTS "${HDF5_SOURCE_DIR}/release_docs" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/release_docs") endif (NOT HDF5_EXTERNALLY_CONFIGURED) +if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) + if (CMAKE_HOST_UNIX) + set (CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/HDF_Group/${HDF5_PACKAGE_NAME}/${HDF5_PACKAGE_VERSION}" + CACHE PATH "Install path prefix, prepended onto install directories." FORCE) + else (CMAKE_HOST_UNIX) + GetDefaultWindowsPrefixBase(CMAKE_GENERIC_PROGRAM_FILES) + set (CMAKE_INSTALL_PREFIX + "${CMAKE_GENERIC_PROGRAM_FILES}/HDF_Group/${HDF5_PACKAGE_NAME}/${HDF5_PACKAGE_VERSION}" + CACHE PATH "Install path prefix, prepended onto install directories." FORCE) + set (CMAKE_GENERIC_PROGRAM_FILES) + endif (CMAKE_HOST_UNIX) +endif (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) + #----------------------------------------------------------------------------- # Set the cpack variables #----------------------------------------------------------------------------- @@ -285,7 +315,8 @@ if (NOT HDF5_EXTERNALLY_CONFIGURED AND NOT HDF5_NO_PACKAGES) set (CPACK_NSIS_MUI_UNIICON "${HDF5_RESOURCES_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_NSIS_DISPLAY_NAME "@CPACK_NSIS_PACKAGE_NAME@, is a data model, library, and file format for storing and managing data") + 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}") @@ -293,10 +324,8 @@ if (NOT HDF5_EXTERNALLY_CONFIGURED AND NOT HDF5_NO_PACKAGES) elseif (APPLE) LIST (APPEND CPACK_GENERATOR "DragNDrop") set (CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE ON) - set (CPACK_PACKAGE_DEFAULT_LOCATION "/opt/${CPACK_PACKAGE_NAME}") - set (CPACK_PACKAGING_INSTALL_PREFIX "/") + set (CPACK_PACKAGING_INSTALL_PREFIX "/${CPACK_PACKAGE_INSTALL_DIRECTORY}") set (CPACK_PACKAGE_ICON "${HDF5_RESOURCES_DIR}/hdf.icns") - set (CPACK_SET_DESTDIR TRUE) # Required when packaging, and set CMAKE_INSTALL_PREFIX to "/". if (HDF5_PACK_MACOSX_BUNDLE) LIST (APPEND CPACK_GENERATOR "Bundle") |