summaryrefslogtreecommitdiffstats
path: root/CMakeInstallation.cmake
diff options
context:
space:
mode:
authorAllen Byrne <50328838+byrnHDF@users.noreply.github.com>2023-02-15 17:11:42 (GMT)
committerGitHub <noreply@github.com>2023-02-15 17:11:42 (GMT)
commit966454aac1231da7209ef81c11055d3312181f99 (patch)
tree70917170b197235c23b073424b58719bb4886a80 /CMakeInstallation.cmake
parent6e3b34188ee54a444cbb2bdfc3f8a0082798f6d4 (diff)
downloadhdf5-966454aac1231da7209ef81c11055d3312181f99.zip
hdf5-966454aac1231da7209ef81c11055d3312181f99.tar.gz
hdf5-966454aac1231da7209ef81c11055d3312181f99.tar.bz2
Add build options for CMake packaging #2347 (#2462)
Diffstat (limited to 'CMakeInstallation.cmake')
-rw-r--r--CMakeInstallation.cmake54
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: