From daeb55850426ed4bd1660c71cf8247d17fb1d164 Mon Sep 17 00:00:00 2001 From: Username404-59 Date: Mon, 1 Mar 2021 19:01:15 +0100 Subject: [PATCH] Add a changelog.txt file and set the CPACK_RPM_BUILDREQUIRES in the CMakeLists.txt file. --- CMakeLists.txt | 8 +++++++- changelog.txt | 2 ++ 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 changelog.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index bcf9de0..87b8006 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.18) -project(Yerbacon VERSION 0.0.1 LANGUAGES "CXX") +project(Yerbacon VERSION 0.0.1 LANGUAGES C CXX) set(CMAKE_CXX_STANDARD 20) set(CMAKE_CXX_STANDARD_REQUIRED ON) @@ -59,9 +59,15 @@ if (UNIX AND NOT MINGW) set(CPACK_RPM_COMPRESSION_TYPE lzma) set(CPACK_RPM_PACKAGE_AUTOREQ YES) set(CPACK_RPM_PACKAGE_LICENSE "MPL-2.0") + set(CPACK_RPM_CHANGELOG_FILE "${CMAKE_CURRENT_SOURCE_DIR}/changelog.txt") set(CPACK_RPM_PACKAGE_VERSION ${PROJECT_VERSION}) set(CPACK_RPM_PACKAGE_RELEASE ${TIME}) set(CPACK_RPM_PACKAGE_RELEASE_DIST ON) + if (CPACK_RPM_PACKAGE_SOURCES) + set(CPACK_GENERATOR RPM) + set(CPACK_RPM_BUILDREQUIRES "cmake >= 3.18, clang >= 11.0.0") + set(CPACK_RPM_SOURCE_PKG_PACKAGING_INSTALL_PREFIX "${CPACK_PACKAGING_INSTALL_PREFIX}") + endif() if (NOT DEFINED CPACK_GENERATOR) set(CPACK_GENERATOR TGZ;STGZ;RPM;DEB) endif() diff --git a/changelog.txt b/changelog.txt new file mode 100644 index 0000000..7ab21b4 --- /dev/null +++ b/changelog.txt @@ -0,0 +1,2 @@ +* Mon Mar 8 2021 Username404 - 0.0.1 +- Initial changelog. \ No newline at end of file