diff options
author | Destroyica <jaudibert@euronext.com> | 2015-07-27 07:59:02 (GMT) |
---|---|---|
committer | Destroyica <jaudibert@euronext.com> | 2015-07-27 07:59:02 (GMT) |
commit | 7f8f31cb8318e663f2ec145b63fb31278bdd7a76 (patch) | |
tree | aa02af303dc92f75d9936a06a1f31a83ac77e341 /cmake/packaging.cmake | |
parent | 9d7221a3bf79e93484639ba7af8e79ad969f1749 (diff) | |
download | Doxygen-7f8f31cb8318e663f2ec145b63fb31278bdd7a76.zip Doxygen-7f8f31cb8318e663f2ec145b63fb31278bdd7a76.tar.gz Doxygen-7f8f31cb8318e663f2ec145b63fb31278bdd7a76.tar.bz2 |
Add RPM build for Red Hat
Diffstat (limited to 'cmake/packaging.cmake')
-rw-r--r-- | cmake/packaging.cmake | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/cmake/packaging.cmake b/cmake/packaging.cmake index a85ce33..0798b83 100644 --- a/cmake/packaging.cmake +++ b/cmake/packaging.cmake @@ -84,6 +84,12 @@ elseif(UNIX) execute_process(COMMAND dpkg --print-architecture OUTPUT_VARIABLE CPACK_DEBIAN_PACKAGE_ARCHITECTURE OUTPUT_STRIP_TRAILING_WHITESPACE) set(CPACK_PACKAGE_FILE_NAME ${CPACK_PACKAGE_NAME}_${CPACK_PACKAGE_VERSION}_${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}) + elseif(distribution MATCHES "RedHat.*") + # extract the major version from RedHat full version (e.g. 6.7 --> 6) + execute_process(COMMAND lsb_release -sr COMMAND sed s/[.].*// OUTPUT_VARIABLE redhat_version_major OUTPUT_STRIP_TRAILING_WHITESPACE) + set(CPACK_GENERATOR "RPM") + set(CPACK_PACKAGE_FILE_NAME ${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${CPACK_RPM_PACKAGE_RELEASE}.el${redhat_version_major}.${CPACK_RPM_PACKAGE_ARCHITECTURE}) + elseif(distribution MATCHES "openSUSE.*") set(CPACK_GENERATOR "RPM") set(CPACK_PACKAGE_FILE_NAME ${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${release}.${CPACK_RPM_PACKAGE_ARCHITECTURE}) |