Add the changelog file to debian packages.
This commit is contained in:
parent
5e08f52668
commit
91570df79a
|
@ -91,6 +91,21 @@ if (UNIX AND NOT MINGW)
|
||||||
set(CPACK_RPM_PACKAGE_AUTOREQ YES)
|
set(CPACK_RPM_PACKAGE_AUTOREQ YES)
|
||||||
set(CPACK_RPM_PACKAGE_LICENSE "MPL-2.0")
|
set(CPACK_RPM_PACKAGE_LICENSE "MPL-2.0")
|
||||||
set(CPACK_RPM_CHANGELOG_FILE "${CMAKE_CURRENT_SOURCE_DIR}/changelog")
|
set(CPACK_RPM_CHANGELOG_FILE "${CMAKE_CURRENT_SOURCE_DIR}/changelog")
|
||||||
|
if (NOT APPLE)
|
||||||
|
add_custom_command(
|
||||||
|
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/changelog.gz"
|
||||||
|
COMMAND gzip -c -k -9 "${CMAKE_CURRENT_SOURCE_DIR}/changelog" > ${CMAKE_CURRENT_BINARY_DIR}/changelog.gz
|
||||||
|
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
|
||||||
|
DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/changelog"
|
||||||
|
COMMENT "Compressing the changelog file"
|
||||||
|
)
|
||||||
|
add_custom_target(changelog ALL DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/changelog.gz")
|
||||||
|
string(TOLOWER "${CMAKE_INSTALL_DOCDIR}" DEB_CHANGELOG_DEST_DIR) # Lowercase characters are needed because GNUInstallDirs uses the PROJECT_NAME variable.
|
||||||
|
install(
|
||||||
|
FILES "${CMAKE_CURRENT_BINARY_DIR}/changelog.gz"
|
||||||
|
DESTINATION ${DEB_CHANGELOG_DEST_DIR}
|
||||||
|
)
|
||||||
|
endif()
|
||||||
set(CPACK_RPM_PACKAGE_VERSION ${PROJECT_VERSION})
|
set(CPACK_RPM_PACKAGE_VERSION ${PROJECT_VERSION})
|
||||||
set(CPACK_RPM_PACKAGE_RELEASE ${TIME})
|
set(CPACK_RPM_PACKAGE_RELEASE ${TIME})
|
||||||
set(CPACK_RPM_PACKAGE_RELEASE_DIST ON)
|
set(CPACK_RPM_PACKAGE_RELEASE_DIST ON)
|
||||||
|
|
Loading…
Reference in New Issue