2024-09-30 21:40:46 +00:00
|
|
|
cmake_minimum_required(VERSION 3.20)
|
2023-01-15 14:31:37 +00:00
|
|
|
# `CMAKE_CUDA_ARCHITECTURES` requires 3.18
|
2024-09-30 21:40:46 +00:00
|
|
|
# `set_source_files_properties` requires 3.18
|
|
|
|
# `cmake_path(CONVERT ... TO_NATIVE_PATH_LIST ...)` requires 3.20
|
2023-09-05 00:16:30 +00:00
|
|
|
# todo - set this conditionally
|
2019-12-03 19:23:33 +00:00
|
|
|
|
2024-05-24 01:42:06 +00:00
|
|
|
project(Sunshine VERSION 0.0.0
|
2024-03-09 15:47:55 +00:00
|
|
|
DESCRIPTION "Self-hosted game stream host for Moonlight"
|
2023-09-05 00:16:30 +00:00
|
|
|
HOMEPAGE_URL "https://app.lizardbyte.dev/Sunshine")
|
|
|
|
|
2024-07-07 14:19:11 +00:00
|
|
|
set(PROJECT_LICENSE "GPL-3.0-only")
|
|
|
|
|
|
|
|
set(PROJECT_FQDN "dev.lizardbyte.app.Sunshine")
|
|
|
|
|
|
|
|
set(PROJECT_BRIEF_DESCRIPTION "GameStream host for Moonlight") # must be <= 35 characters
|
2019-12-03 19:23:33 +00:00
|
|
|
|
2022-12-28 21:30:32 +00:00
|
|
|
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.")
|
2022-06-21 02:53:40 +00:00
|
|
|
|
2023-01-20 06:18:30 +00:00
|
|
|
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()
|
|
|
|
|
2023-09-05 00:16:30 +00:00
|
|
|
# set the module path, used for includes
|
2024-02-03 20:29:09 +00:00
|
|
|
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
|
2022-12-29 13:24:13 +00:00
|
|
|
|
2023-09-05 00:16:30 +00:00
|
|
|
# set version info for this build
|
|
|
|
include(${CMAKE_MODULE_PATH}/prep/build_version.cmake)
|
2022-12-29 13:24:13 +00:00
|
|
|
|
2023-09-05 00:16:30 +00:00
|
|
|
# cmake build flags
|
|
|
|
include(${CMAKE_MODULE_PATH}/prep/options.cmake)
|
2022-04-23 09:48:05 +00:00
|
|
|
|
2024-04-06 02:48:13 +00:00
|
|
|
# initial prep
|
|
|
|
include(${CMAKE_MODULE_PATH}/prep/init.cmake)
|
|
|
|
|
2023-09-05 00:16:30 +00:00
|
|
|
# configure special package files, such as sunshine.desktop, Flatpak manifest, Portfile , etc.
|
|
|
|
include(${CMAKE_MODULE_PATH}/prep/special_package_configuration.cmake)
|
2022-04-23 09:48:05 +00:00
|
|
|
|
2023-09-05 00:16:30 +00:00
|
|
|
# Exit early if END_BUILD is ON, i.e. when only generating package manifests
|
|
|
|
if(${END_BUILD})
|
|
|
|
return()
|
2022-05-12 01:31:31 +00:00
|
|
|
endif()
|
2022-12-29 13:24:13 +00:00
|
|
|
|
2023-09-05 00:16:30 +00:00
|
|
|
# project constants
|
|
|
|
include(${CMAKE_MODULE_PATH}/prep/constants.cmake)
|
2022-12-29 13:24:13 +00:00
|
|
|
|
2023-09-05 00:16:30 +00:00
|
|
|
# load macros
|
|
|
|
include(${CMAKE_MODULE_PATH}/macros/common.cmake)
|
2022-12-29 13:24:13 +00:00
|
|
|
|
2023-09-05 00:16:30 +00:00
|
|
|
# load dependencies
|
|
|
|
include(${CMAKE_MODULE_PATH}/dependencies/common.cmake)
|
2022-12-29 13:24:13 +00:00
|
|
|
|
2023-09-05 00:16:30 +00:00
|
|
|
# setup compile definitions
|
|
|
|
include(${CMAKE_MODULE_PATH}/compile_definitions/common.cmake)
|
2022-12-29 13:24:13 +00:00
|
|
|
|
2023-09-05 00:16:30 +00:00
|
|
|
# target definitions
|
|
|
|
include(${CMAKE_MODULE_PATH}/targets/common.cmake)
|
2022-04-23 09:48:05 +00:00
|
|
|
|
2023-09-05 00:16:30 +00:00
|
|
|
# packaging
|
|
|
|
include(${CMAKE_MODULE_PATH}/packaging/common.cmake)
|