diff --git a/CMakeLists.txt b/CMakeLists.txt index 97306c443..564e22808 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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 diff --git a/es-app/CMakeLists.txt b/es-app/CMakeLists.txt index 80e808eb2..a8dd50af7 100644 --- a/es-app/CMakeLists.txt +++ b/es-app/CMakeLists.txt @@ -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 ") 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")