(Linux) Whether to use the CPack DEB or RPM generator can now be set using a variable.

This commit is contained in:
Leon Styhre 2021-05-04 17:09:19 +02:00
parent cae2401ade
commit ac93d09db9
2 changed files with 9 additions and 4 deletions

View file

@ -9,6 +9,9 @@ project(emulationstation-de)
# Set this to ON to show verbose compiler output (e.g. compiler flags, include directories etc.)
set(CMAKE_VERBOSE_MAKEFILE OFF CACHE BOOL "Show verbose compiler output" FORCE)
# Package type to use for CPack on Linux.
set(LINUX_CPACK_GENERATOR "DEB" CACHE STRING "CPack generator, DEB or RPM")
# Add local find modules to the CMake path.
list(APPEND CMAKE_MODULE_PATH
${CMAKE_CURRENT_SOURCE_DIR}/CMake/Utils

View file

@ -282,7 +282,9 @@ elseif(WIN32)
else()
set(CPACK_PACKAGE_INSTALL_DIRECTORY "emulationstation_${CMAKE_PACKAGE_VERSION}")
set(CPACK_PACKAGE_EXECUTABLES "emulationstation" "emulationstation")
set(CPACK_GENERATOR "DEB")
if("${LINUX_CPACK_GENERATOR}" STREQUAL "DEB")
set(CPACK_GENERATOR "DEB")
endif()
set(CPACK_DEBIAN_FILE_NAME "emulationstation-de-${CPACK_PACKAGE_VERSION}-${CPU_ARCHITECTURE}.deb")
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "Leon Styhre <leon@leonstyhre.com>")
set(CPACK_DEBIAN_PACKAGE_HOMEPAGE "https://es-de.org")
@ -290,9 +292,9 @@ else()
set(CPACK_DEBIAN_PACKAGE_PRIORITY "optional")
set(CPACK_DEBIAN_PACKAGE_DEPENDS "vlc")
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
# Uncomment the next line to generate .rpm packages.
#set(CPACK_GENERATOR "RPM")
if("${LINUX_CPACK_GENERATOR}" STREQUAL "RPM")
set(CPACK_GENERATOR "RPM")
endif()
set(CPACK_RPM_FILE_NAME "emulationstation-de-${CPACK_PACKAGE_VERSION}-${CPU_ARCHITECTURE}.rpm")
set(CPACK_RPM_PACKAGE_DESCRIPTION ${CPACK_PACKAGE_DESCRIPTION})
set(CPACK_RPM_PACKAGE_LICENSE "MIT")