forked from LizardByte/Sunshine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
60 lines (42 loc) · 2.02 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
cmake_minimum_required(VERSION 3.18)
# `CMAKE_CUDA_ARCHITECTURES` requires 3.18
# todo - set this conditionally
# todo - set version to 0.0.0 once confident in automated versioning
project(Sunshine VERSION 0.21.0
DESCRIPTION "Sunshine is a self-hosted game stream host for Moonlight."
HOMEPAGE_URL "https://app.lizardbyte.dev/Sunshine")
set(PROJECT_LICENSE "GPL-3.0")
set(PROJECT_LONG_DESCRIPTION "Offering low latency, cloud gaming server capabilities with support for AMD, Intel, \
and Nvidia GPUs for hardware encoding. Software encoding is also available. You can connect to Sunshine from any \
Moonlight client on a variety of devices. A web UI is provided to allow configuration, and client pairing, from \
your favorite web browser. Pair from the local server or any mobile device.")
# TEST
set(CMAKE_BUILD_TYPE "Debug")
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
message(STATUS "Setting build type to 'Release' as none was specified.")
set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Choose the type of build." FORCE)
endif()
# set the module path, used for includes
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
# set version info for this build
include(${CMAKE_MODULE_PATH}/prep/build_version.cmake)
# cmake build flags
include(${CMAKE_MODULE_PATH}/prep/options.cmake)
# configure special package files, such as sunshine.desktop, Flatpak manifest, Portfile , etc.
include(${CMAKE_MODULE_PATH}/prep/special_package_configuration.cmake)
# Exit early if END_BUILD is ON, i.e. when only generating package manifests
if(${END_BUILD})
return()
endif()
# project constants
include(${CMAKE_MODULE_PATH}/prep/constants.cmake)
# load macros
include(${CMAKE_MODULE_PATH}/macros/common.cmake)
# load dependencies
include(${CMAKE_MODULE_PATH}/dependencies/common.cmake)
# setup compile definitions
include(${CMAKE_MODULE_PATH}/compile_definitions/common.cmake)
# target definitions
include(${CMAKE_MODULE_PATH}/targets/common.cmake)
# packaging
include(${CMAKE_MODULE_PATH}/packaging/common.cmake)