Commit 41ae6bf2 authored by Melroy van den Berg's avatar Melroy van den Berg
Browse files

Merge branch '7-update-deb-rpm-packages-with-runtime-depedencies' into 'master'

Resolve "Update deb/rpm packages with runtime depedencies"

Closes #7

See merge request melroy/winegui!1
parents c7c3ff0d 5da0a075
# Doxygen
doc/doxygen
doc/doxygen/
# Build stuff
build
build_debug
build/
build_debug/
build_prod/
# winetricks script
winetricks
......
if (POLICY CMP0048)
cmake_policy(SET CMP0048 NEW)
endif()
cmake_minimum_required(VERSION 3.10)
set(PROJECT_NAME WineGUI)
set(PROJECT_TARGET winegui)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
# Get VERSION from most recent git tag
include(git_version)
# Don't forget to update the about_dialog.h VERSION as well
project(${PROJECT_NAME} VERSION 1.6.0 DESCRIPTION "WineGUI is a user-friendly WINE graphical interface")
project(${PROJECT_NAME}
VERSION ${GIT_TAG_VERSION}
DESCRIPTION "WineGUI is a user-friendly WINE graphical interface"
LANGUAGES CXX)
message("CMAKE_BUILD_TYPE = ${CMAKE_BUILD_TYPE}")
message("PROJECT_VERSION = ${PROJECT_VERSION}")
cmake_minimum_required(VERSION 2.8.0)
# Cmake settings
set(CMAKE_CXX_FLAGS "-Wall -Wextra")
set(CMAKE_CXX_FLAGS_DEBUG "-g")
......@@ -35,7 +41,7 @@ if("${CMAKE_BUILD_TYPE}" STREQUAL "Release")
add_definitions(-DPRODUCTION=1)
# Include CPack packaging settings
include(packaging.cmake)
include(packaging)
endif()
################################
......@@ -83,13 +89,7 @@ add_custom_target( run
# Doxygen #
############
if(doc)
find_package(Doxygen REQUIRED)
set(DOXYGEN_CONFIG ${CMAKE_CURRENT_BINARY_DIR}/../doxygen.conf)
# note the option ALL which allows to build the docs together with the application
add_custom_target( docs ALL
COMMAND ${DOXYGEN_EXECUTABLE} ${DOXYGEN_CONFIG}
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Generating API documentation with Doxygen"
VERBATIM )
include(doxygen)
endif()
find_package(Doxygen REQUIRED)
set(DOXYGEN_CONFIG ${CMAKE_CURRENT_BINARY_DIR}/../doxygen.conf)
# note the option ALL which allows to build the docs together with the application
add_custom_target(Doxygen ALL
COMMAND ${DOXYGEN_EXECUTABLE} ${DOXYGEN_CONFIG}
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Generating API documentation with Doxygen"
VERBATIM)
find_package(Git QUIET REQUIRED)
if(GIT_FOUND)
set_property(GLOBAL APPEND
PROPERTY CMAKE_CONFIGURE_DEPENDS
"${CMAKE_SOURCE_DIR}/.git/index")
execute_process(
COMMAND "${GIT_EXECUTABLE}" describe --always HEAD
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
RESULT_VARIABLE res
OUTPUT_VARIABLE GIT_HEAD_TAG
ERROR_QUIET
OUTPUT_STRIP_TRAILING_WHITESPACE)
# For debug reasons use:
# message("GIT_HEAD_TAG = ${GIT_HEAD_TAG}")
if("${GIT_HEAD_TAG}" MATCHES "^v([0-9]+)\\.([0-9]+)\\.([0-9]+).*$")
string(REGEX REPLACE "^v([0-9]+)\\.([0-9]+)\\.([0-9]+).*$"
"\\1;\\2;\\3" _ver_parts "${GIT_HEAD_TAG}")
list(GET _ver_parts 0 GIT_TAG_VERSION_MAJOR)
list(GET _ver_parts 1 GIT_TAG_VERSION_MINOR)
list(GET _ver_parts 2 GIT_TAG_VERSION_PATCH)
else()
set(GIT_TAG_VERSION_MAJOR "0")
set(GIT_TAG_VERSION_MINOR "0")
set(GIT_TAG_VERSION_PATCH "0")
endif()
set(GIT_TAG_VERSION "${GIT_TAG_VERSION_MAJOR}.${GIT_TAG_VERSION_MINOR}.${GIT_TAG_VERSION_PATCH}")
else(GIT_FOUND)
message("GIT needs to be installed to generate GIT versioning.")
endif(GIT_FOUND)
\ No newline at end of file
......@@ -27,15 +27,19 @@ endif ()
if(${LINUX_DISTRO} MATCHES "openSUSE")
# OpenSuse/Leap
set(CPACK_RPM_PACKAGE_REQUIRES "gtkmm3")
set(CPACK_RPM_PACKAGE_REQUIRES "gtkmm3, cabextract, unzip, p7zip, wget")
else()
# Redhat/CentOS/Fedora/etc.
set(CPACK_RPM_PACKAGE_REQUIRES "gtkmm30")
set(CPACK_RPM_PACKAGE_REQUIRES "gtkmm30, cabextract, unzip, p7zip, wget")
endif()
# Optional RPM packages
set(CPACK_RPM_PACKAGE_SUGGESTS "vulkan, vulkan-loader")
# Debian Jessie/Ubuntu Trusty/Mint Qiana (libgtkmm-3.0-1) or
# Debian Stretch, Buster or newer, Ubuntu Xenial, Artful, Bionic or newer, Linux Mint Sarah, Tessa, Tina or newer (libgtkmm-3.0-1v5)
set(CPACK_DEBIAN_PACKAGE_DEPENDS "libgtkmm-3.0-1 | libgtkmm-3.0-1v5")
set(CPACK_DEBIAN_PACKAGE_DEPENDS "libgtkmm-3.0-1 | libgtkmm-3.0-1v5, cabextract, unzip, p7zip, wget")
# Optional deb packages
set(CPACK_DEBIAN_PACKAGE_SUGGESTS "libvulkan1, libvulkan1:i386, mesa-vulkan-drivers, mesa-vulkan-drivers:i386")
# include CPack model once all variables are set
include(CPack)
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment