diff options
author | Allen Byrne <50328838+byrnHDF@users.noreply.github.com> | 2023-02-17 22:13:14 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-17 22:13:14 (GMT) |
commit | f527239564fc27a6e666ce734b88e4ab18765efc (patch) | |
tree | 44c76c6899e052a6cf4270e87a1e6950a5cee1f7 | |
parent | b8eac9d0eb2123ca247af066a923dc4723fae8a0 (diff) | |
download | hdf5-f527239564fc27a6e666ce734b88e4ab18765efc.zip hdf5-f527239564fc27a6e666ce734b88e4ab18765efc.tar.gz hdf5-f527239564fc27a6e666ce734b88e4ab18765efc.tar.bz2 |
Merge Add build options for CMake packaging #2347 (#2464)
-rw-r--r-- | CMakeInstallation.cmake | 54 |
1 files changed, 30 insertions, 24 deletions
diff --git a/CMakeInstallation.cmake b/CMakeInstallation.cmake index f643afc..d13f8bb 100644 --- a/CMakeInstallation.cmake +++ b/CMakeInstallation.cmake @@ -395,24 +395,29 @@ if (NOT HDF5_EXTERNALLY_CONFIGURED AND NOT HDF5_NO_PACKAGES) set (CPACK_PACKAGING_INSTALL_PREFIX "/${CPACK_PACKAGE_INSTALL_DIRECTORY}") set (CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE ON) - list (APPEND CPACK_GENERATOR "DEB") - set (CPACK_DEBIAN_PACKAGE_SECTION "Libraries") - set (CPACK_DEBIAN_PACKAGE_MAINTAINER "${HDF5_PACKAGE_BUGREPORT}") - - list (APPEND CPACK_GENERATOR "RPM") - set (CPACK_RPM_PACKAGE_RELEASE "1") - set (CPACK_RPM_PACKAGE_RELEASE_DIST ON) - set (CPACK_RPM_COMPONENT_INSTALL ON) - set (CPACK_RPM_PACKAGE_RELOCATABLE ON) - set (CPACK_RPM_FILE_NAME "RPM-DEFAULT") - set (CPACK_RPM_PACKAGE_NAME "${CPACK_PACKAGE_NAME}") - set (CPACK_RPM_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION}") - set (CPACK_RPM_PACKAGE_VENDOR "${CPACK_PACKAGE_VENDOR}") - set (CPACK_RPM_PACKAGE_LICENSE "BSD-style") - set (CPACK_RPM_PACKAGE_GROUP "Development/Libraries") - set (CPACK_RPM_PACKAGE_URL "${HDF5_PACKAGE_URL}") - set (CPACK_RPM_PACKAGE_SUMMARY "HDF5 is a unique technology suite that makes possible the management of extremely large and complex data collections.") - set (CPACK_RPM_PACKAGE_DESCRIPTION + find_program (DPKGSHLIB_EXE dpkg-shlibdeps) + if (DPKGSHLIB_EXE) + list (APPEND CPACK_GENERATOR "DEB") + set (CPACK_DEBIAN_PACKAGE_SECTION "Libraries") + set (CPACK_DEBIAN_PACKAGE_MAINTAINER "${HDF5_PACKAGE_BUGREPORT}") + endif () + + find_program (RPMBUILD_EXE rpmbuild) + if (RPMBUILD_EXE) + list (APPEND CPACK_GENERATOR "RPM") + set (CPACK_RPM_PACKAGE_RELEASE "1") + set (CPACK_RPM_PACKAGE_RELEASE_DIST ON) + set (CPACK_RPM_COMPONENT_INSTALL ON) + set (CPACK_RPM_PACKAGE_RELOCATABLE ON) + set (CPACK_RPM_FILE_NAME "RPM-DEFAULT") + set (CPACK_RPM_PACKAGE_NAME "${CPACK_PACKAGE_NAME}") + set (CPACK_RPM_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION}") + set (CPACK_RPM_PACKAGE_VENDOR "${CPACK_PACKAGE_VENDOR}") + set (CPACK_RPM_PACKAGE_LICENSE "BSD-style") + set (CPACK_RPM_PACKAGE_GROUP "Development/Libraries") + set (CPACK_RPM_PACKAGE_URL "${HDF5_PACKAGE_URL}") + set (CPACK_RPM_PACKAGE_SUMMARY "HDF5 is a unique technology suite that makes possible the management of extremely large and complex data collections.") + set (CPACK_RPM_PACKAGE_DESCRIPTION "The HDF5 technology suite includes: * A versatile data model that can represent very complex data objects and a wide variety of metadata. @@ -427,13 +432,14 @@ if (NOT HDF5_EXTERNALLY_CONFIGURED AND NOT HDF5_NO_PACKAGES) The HDF5 data model, file format, API, library, and tools are open and distributed without charge. " - ) + ) - #----------------------------------------------------------------------------- - # Configure the spec file for the install RPM - #----------------------------------------------------------------------------- -# configure_file ("${HDF5_RESOURCES_DIR}/hdf5.spec.in" "${CMAKE_CURRENT_BINARY_DIR}/${HDF5_PACKAGE_NAME}.spec" @ONLY IMMEDIATE) -# set (CPACK_RPM_USER_BINARY_SPECFILE "${CMAKE_CURRENT_BINARY_DIR}/${HDF5_PACKAGE_NAME}.spec") + #----------------------------------------------------------------------------- + # Configure the spec file for the install RPM + #----------------------------------------------------------------------------- +# configure_file ("${HDF5_RESOURCES_DIR}/hdf5.spec.in" "${CMAKE_CURRENT_BINARY_DIR}/${HDF5_PACKAGE_NAME}.spec" @ONLY IMMEDIATE) +# set (CPACK_RPM_USER_BINARY_SPECFILE "${CMAKE_CURRENT_BINARY_DIR}/${HDF5_PACKAGE_NAME}.spec") + endif () endif () # By default, do not warn when built on machines using only VS Express: |