Add a changelog.txt file and set the CPACK_RPM_BUILDREQUIRES in the CMakeLists.txt file.

This commit is contained in:
Username404-59 2021-03-01 19:01:15 +01:00
parent aa2691316f
commit daeb558504
Signed by: Username404-59
GPG Key ID: 7AB361FBB257A5D1
2 changed files with 9 additions and 1 deletions

View File

@ -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()

2
changelog.txt Normal file
View File

@ -0,0 +1,2 @@
* Mon Mar 8 2021 Username404 <w.iron.zombie@gmail.com> - 0.0.1
- Initial changelog.